floBlockchainAPI v2.5.5a: bug fix
This commit is contained in:
parent
b09c88f0df
commit
a762f4441b
@ -1,4 +1,4 @@
|
|||||||
(function (EXPORTS) { //floBlockchainAPI v2.5.5
|
(function (EXPORTS) { //floBlockchainAPI v2.5.5a
|
||||||
/* FLO Blockchain Operator to send/receive data from blockchain using API calls*/
|
/* FLO Blockchain Operator to send/receive data from blockchain using API calls*/
|
||||||
'use strict';
|
'use strict';
|
||||||
const floBlockchainAPI = EXPORTS;
|
const floBlockchainAPI = EXPORTS;
|
||||||
@ -7,7 +7,7 @@
|
|||||||
blockchain: floGlobals.blockchain,
|
blockchain: floGlobals.blockchain,
|
||||||
apiURL: {
|
apiURL: {
|
||||||
FLO: ['https://flosight.duckdns.org/', 'https://flosight.ranchimall.net/'],
|
FLO: ['https://flosight.duckdns.org/', 'https://flosight.ranchimall.net/'],
|
||||||
FLO_TEST: ['https://testnet-flosight.duckdns.org', 'https://testnet.flocha.in/']
|
FLO_TEST: ['https://flosight-testnet.ranchimall.net/']
|
||||||
},
|
},
|
||||||
sendAmt: 0.0003,
|
sendAmt: 0.0003,
|
||||||
fee: 0.0002,
|
fee: 0.0002,
|
||||||
@ -290,8 +290,8 @@
|
|||||||
if (balance < totalAmt + fee)
|
if (balance < totalAmt + fee)
|
||||||
return reject("Insufficient FLO balance!");
|
return reject("Insufficient FLO balance!");
|
||||||
//get unconfirmed tx list
|
//get unconfirmed tx list
|
||||||
getUnconfirmedSpent(senderAddr).then(unconfirmedSpent => {
|
getUnconfirmedSpent(floID).then(unconfirmedSpent => {
|
||||||
getUTXOs(senderAddr).then(utxos => {
|
getUTXOs(floID).then(utxos => {
|
||||||
var trx = bitjs.transaction();
|
var trx = bitjs.transaction();
|
||||||
var utxoAmt = 0.0;
|
var utxoAmt = 0.0;
|
||||||
for (let i = utxos.length - 1; (i >= 0) && (utxoAmt < totalAmt + fee); i--) {
|
for (let i = utxos.length - 1; (i >= 0) && (utxoAmt < totalAmt + fee); i--) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user