diff --git a/docs/scripts/btcOperator.js b/docs/scripts/btcOperator.js index baa70a5..edba786 100644 --- a/docs/scripts/btcOperator.js +++ b/docs/scripts/btcOperator.js @@ -1,4 +1,4 @@ -(function (EXPORTS) { //btcOperator v1.0.13 +(function (EXPORTS) { //btcOperator v1.0.13a /* BTC Crypto and API Operator */ const btcOperator = EXPORTS; @@ -713,7 +713,7 @@ } btcOperator.getTx = txid => new Promise((resolve, reject) => { - fetch_api(`tx/BTC/${txid}`) + fetch_api(`get_tx/BTC/${txid}`) .then(result => resolve(result.data)) .catch(error => reject(error)) }); diff --git a/src/background.js b/src/background.js index cd26f53..17715d4 100644 --- a/src/background.js +++ b/src/background.js @@ -203,7 +203,7 @@ verifyTx.BTC = function (sender, txid, group) { return reject([true, "Transaction not sent by the sender"]); if (vin_sender.length !== tx.inputs.length) return reject([true, "Transaction input containes other floIDs"]); - if (!tx.block_no) + if (!tx.blockhash) return reject([false, "Transaction not included in any block yet"]); if (!tx.confirmations) return reject([false, "Transaction not confirmed yet"]); diff --git a/src/set_globals.js b/src/set_globals.js index 39756ad..0bb2d5e 100644 --- a/src/set_globals.js +++ b/src/set_globals.js @@ -13,7 +13,7 @@ try { global[p] = param[p]; } -global.toStandardDecimal = num => (parseInt(num * 1e8) * 1e-8) +global.toStandardDecimal = num => parseFloat((parseInt(num * 1e8) * 1e-8).toFixed(8)) if (!process.argv.includes("--debug")) global.console.debug = () => null;