Merge pull request #4 from oipwg/return-floData-in-api
Return floData properly in api
This commit is contained in:
commit
b93f96f0a6
@ -371,13 +371,13 @@ BlockController.prototype.getPoolInfo = function(tx) {
|
||||
if (!tx) {
|
||||
return {};
|
||||
}
|
||||
var strFloData = "";
|
||||
var floData = "";
|
||||
|
||||
if (tx.strFloData)
|
||||
strFloData = tx.strFloData;
|
||||
if (tx.floData)
|
||||
floData = tx.floData.toString()
|
||||
|
||||
for(var k in this.poolStrings) {
|
||||
if (strFloData.includes(k)) {
|
||||
if (floData.includes(k)) {
|
||||
return this.poolStrings[k];
|
||||
}
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ TxController.prototype.transformTransaction = function(transaction, options, cal
|
||||
txid: transaction.txid(),
|
||||
version: transaction.version,
|
||||
locktime: transaction.locktime,
|
||||
floData: transaction.strFloData
|
||||
floData: transaction.floData.toString()
|
||||
};
|
||||
|
||||
if(transaction.inputs[0].isCoinbase()) {
|
||||
@ -211,7 +211,7 @@ TxController.prototype.transformInvTransaction = function(transaction) {
|
||||
valueOut: valueOut / 1e8,
|
||||
vout: vout,
|
||||
isRBF: isRBF,
|
||||
floData: transaction.strFloData
|
||||
floData: transaction.floData.toString()
|
||||
};
|
||||
|
||||
return transformed;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "flosight-api",
|
||||
"description": "A Florincoin blockchain REST and web socket API service for Flocore Node.",
|
||||
"version": "5.0.0-beta.74",
|
||||
"version": "5.0.0-beta.75",
|
||||
"repository": "git://github.com/bitpay/flosight-api.git",
|
||||
"bugs": {
|
||||
"url": "https://github.com/bitpay/flosight-api/issues"
|
||||
@ -30,7 +30,7 @@
|
||||
"dependencies": {
|
||||
"JSONStream": "^1.3.1",
|
||||
"async": "*",
|
||||
"fcoin": "^1.1.0",
|
||||
"fcoin": "^1.1.1",
|
||||
"flocore-lib": "^0.15.2",
|
||||
"flocore-message": "^1.0.7",
|
||||
"body-parser": "^1.13.3",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user