From d3478fb2baf2a2aa15a521cb018ea23f425998d3 Mon Sep 17 00:00:00 2001 From: Rafael Taranto Date: Tue, 16 Apr 2019 00:06:14 -0300 Subject: [PATCH] Fix fee fetching issues --- lib/plugins/wallet/bitcoincashd/bitcoincashd.js | 4 ++-- lib/plugins/wallet/bitcoind/bitcoind.js | 4 ++-- lib/plugins/wallet/dashd/dashd.js | 4 ++-- lib/plugins/wallet/litecoind/litecoind.js | 4 ++-- lib/plugins/wallet/zcashd/zcashd.js | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/plugins/wallet/bitcoincashd/bitcoincashd.js b/lib/plugins/wallet/bitcoincashd/bitcoincashd.js index b1d119b1..e7c4e322 100644 --- a/lib/plugins/wallet/bitcoincashd/bitcoincashd.js +++ b/lib/plugins/wallet/bitcoincashd/bitcoincashd.js @@ -42,8 +42,8 @@ function sendCoins (account, address, cryptoAtoms, cryptoCode) { return checkCryptoCode(cryptoCode) .then(() => fetch('sendtoaddress', [address, coins])) - .then((txId) => fetch('gettransaction', txId)) - .then((res) => _.pick(res, ['fee', 'txid'])) + .then((txId) => fetch('gettransaction', [txId])) + .then((res) => _.pick(['fee', 'txid'], res)) .then((pickedObj) => { return { fee: BN(pickedObj.fee).abs().shift(unitScale).round(), diff --git a/lib/plugins/wallet/bitcoind/bitcoind.js b/lib/plugins/wallet/bitcoind/bitcoind.js index a56b8ce6..bf07680f 100644 --- a/lib/plugins/wallet/bitcoind/bitcoind.js +++ b/lib/plugins/wallet/bitcoind/bitcoind.js @@ -42,8 +42,8 @@ function sendCoins (account, address, cryptoAtoms, cryptoCode) { return checkCryptoCode(cryptoCode) .then(() => fetch('sendtoaddress', [address, coins])) - .then((txId) => fetch('gettransaction', txId)) - .then((res) => _.pick(res, ['fee', 'txid'])) + .then((txId) => fetch('gettransaction', [txId])) + .then((res) => _.pick(['fee', 'txid'], res)) .then((pickedObj) => { return { fee: BN(pickedObj.fee).abs().shift(unitScale).round(), diff --git a/lib/plugins/wallet/dashd/dashd.js b/lib/plugins/wallet/dashd/dashd.js index ffaddeae..8fec7587 100644 --- a/lib/plugins/wallet/dashd/dashd.js +++ b/lib/plugins/wallet/dashd/dashd.js @@ -43,8 +43,8 @@ function sendCoins (account, address, cryptoAtoms, cryptoCode) { return checkCryptoCode(cryptoCode) .then(() => fetch('sendtoaddress', [address, coins])) - .then((txId) => fetch('gettransaction', txId)) - .then((res) => _.pick(res, ['fee', 'txid'])) + .then((txId) => fetch('gettransaction', [txId])) + .then((res) => _.pick(['fee', 'txid'], res)) .then((pickedObj) => { return { fee: BN(pickedObj.fee).abs().shift(unitScale).round(), diff --git a/lib/plugins/wallet/litecoind/litecoind.js b/lib/plugins/wallet/litecoind/litecoind.js index 606d665f..ea117da4 100644 --- a/lib/plugins/wallet/litecoind/litecoind.js +++ b/lib/plugins/wallet/litecoind/litecoind.js @@ -43,8 +43,8 @@ function sendCoins (account, address, cryptoAtoms, cryptoCode) { return checkCryptoCode(cryptoCode) .then(() => fetch('sendtoaddress', [address, coins])) - .then((txId) => fetch('gettransaction', txId)) - .then((res) => _.pick(res, ['fee', 'txid'])) + .then((txId) => fetch('gettransaction', [txId])) + .then((res) => _.pick(['fee', 'txid'], res)) .then((pickedObj) => { return { fee: BN(pickedObj.fee).abs().shift(unitScale).round(), diff --git a/lib/plugins/wallet/zcashd/zcashd.js b/lib/plugins/wallet/zcashd/zcashd.js index fb05a951..25618fe7 100644 --- a/lib/plugins/wallet/zcashd/zcashd.js +++ b/lib/plugins/wallet/zcashd/zcashd.js @@ -43,8 +43,8 @@ function sendCoins (account, address, cryptoAtoms, cryptoCode) { return checkCryptoCode(cryptoCode) .then(() => fetch('sendtoaddress', [address, coins])) - .then((txId) => fetch('gettransaction', txId)) - .then((res) => _.pick(res, ['fee', 'txid'])) + .then((txId) => fetch('gettransaction', [txId])) + .then((res) => _.pick(['fee', 'txid'], res)) .then((pickedObj) => { return { fee: BN(pickedObj.fee).abs().shift(unitScale).round(),