Merge pull request #4 from oipwg/return-floData-in-api

Return floData properly in api
This commit is contained in:
Sky Young 2019-09-10 09:46:44 -06:00 committed by GitHub
commit b93f96f0a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -371,13 +371,13 @@ BlockController.prototype.getPoolInfo = function(tx) {
if (!tx) { if (!tx) {
return {}; return {};
} }
var strFloData = ""; var floData = "";
if (tx.strFloData) if (tx.floData)
strFloData = tx.strFloData; floData = tx.floData.toString()
for(var k in this.poolStrings) { for(var k in this.poolStrings) {
if (strFloData.includes(k)) { if (floData.includes(k)) {
return this.poolStrings[k]; return this.poolStrings[k];
} }
} }

View File

@ -77,7 +77,7 @@ TxController.prototype.transformTransaction = function(transaction, options, cal
txid: transaction.txid(), txid: transaction.txid(),
version: transaction.version, version: transaction.version,
locktime: transaction.locktime, locktime: transaction.locktime,
floData: transaction.strFloData floData: transaction.floData.toString()
}; };
if(transaction.inputs[0].isCoinbase()) { if(transaction.inputs[0].isCoinbase()) {
@ -211,7 +211,7 @@ TxController.prototype.transformInvTransaction = function(transaction) {
valueOut: valueOut / 1e8, valueOut: valueOut / 1e8,
vout: vout, vout: vout,
isRBF: isRBF, isRBF: isRBF,
floData: transaction.strFloData floData: transaction.floData.toString()
}; };
return transformed; return transformed;

View File

@ -1,7 +1,7 @@
{ {
"name": "flosight-api", "name": "flosight-api",
"description": "A Florincoin blockchain REST and web socket API service for Flocore Node.", "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", "repository": "git://github.com/bitpay/flosight-api.git",
"bugs": { "bugs": {
"url": "https://github.com/bitpay/flosight-api/issues" "url": "https://github.com/bitpay/flosight-api/issues"
@ -30,7 +30,7 @@
"dependencies": { "dependencies": {
"JSONStream": "^1.3.1", "JSONStream": "^1.3.1",
"async": "*", "async": "*",
"fcoin": "^1.1.0", "fcoin": "^1.1.1",
"flocore-lib": "^0.15.2", "flocore-lib": "^0.15.2",
"flocore-message": "^1.0.7", "flocore-message": "^1.0.7",
"body-parser": "^1.13.3", "body-parser": "^1.13.3",