Fix fee fetching issues

This commit is contained in:
Rafael Taranto 2019-04-16 00:06:14 -03:00 committed by Josh Harvey
parent 0088ba7068
commit d3478fb2ba
5 changed files with 10 additions and 10 deletions

View file

@ -42,8 +42,8 @@ function sendCoins (account, address, cryptoAtoms, cryptoCode) {
return checkCryptoCode(cryptoCode) return checkCryptoCode(cryptoCode)
.then(() => fetch('sendtoaddress', [address, coins])) .then(() => fetch('sendtoaddress', [address, coins]))
.then((txId) => fetch('gettransaction', txId)) .then((txId) => fetch('gettransaction', [txId]))
.then((res) => _.pick(res, ['fee', 'txid'])) .then((res) => _.pick(['fee', 'txid'], res))
.then((pickedObj) => { .then((pickedObj) => {
return { return {
fee: BN(pickedObj.fee).abs().shift(unitScale).round(), fee: BN(pickedObj.fee).abs().shift(unitScale).round(),

View file

@ -42,8 +42,8 @@ function sendCoins (account, address, cryptoAtoms, cryptoCode) {
return checkCryptoCode(cryptoCode) return checkCryptoCode(cryptoCode)
.then(() => fetch('sendtoaddress', [address, coins])) .then(() => fetch('sendtoaddress', [address, coins]))
.then((txId) => fetch('gettransaction', txId)) .then((txId) => fetch('gettransaction', [txId]))
.then((res) => _.pick(res, ['fee', 'txid'])) .then((res) => _.pick(['fee', 'txid'], res))
.then((pickedObj) => { .then((pickedObj) => {
return { return {
fee: BN(pickedObj.fee).abs().shift(unitScale).round(), fee: BN(pickedObj.fee).abs().shift(unitScale).round(),

View file

@ -43,8 +43,8 @@ function sendCoins (account, address, cryptoAtoms, cryptoCode) {
return checkCryptoCode(cryptoCode) return checkCryptoCode(cryptoCode)
.then(() => fetch('sendtoaddress', [address, coins])) .then(() => fetch('sendtoaddress', [address, coins]))
.then((txId) => fetch('gettransaction', txId)) .then((txId) => fetch('gettransaction', [txId]))
.then((res) => _.pick(res, ['fee', 'txid'])) .then((res) => _.pick(['fee', 'txid'], res))
.then((pickedObj) => { .then((pickedObj) => {
return { return {
fee: BN(pickedObj.fee).abs().shift(unitScale).round(), fee: BN(pickedObj.fee).abs().shift(unitScale).round(),

View file

@ -43,8 +43,8 @@ function sendCoins (account, address, cryptoAtoms, cryptoCode) {
return checkCryptoCode(cryptoCode) return checkCryptoCode(cryptoCode)
.then(() => fetch('sendtoaddress', [address, coins])) .then(() => fetch('sendtoaddress', [address, coins]))
.then((txId) => fetch('gettransaction', txId)) .then((txId) => fetch('gettransaction', [txId]))
.then((res) => _.pick(res, ['fee', 'txid'])) .then((res) => _.pick(['fee', 'txid'], res))
.then((pickedObj) => { .then((pickedObj) => {
return { return {
fee: BN(pickedObj.fee).abs().shift(unitScale).round(), fee: BN(pickedObj.fee).abs().shift(unitScale).round(),

View file

@ -43,8 +43,8 @@ function sendCoins (account, address, cryptoAtoms, cryptoCode) {
return checkCryptoCode(cryptoCode) return checkCryptoCode(cryptoCode)
.then(() => fetch('sendtoaddress', [address, coins])) .then(() => fetch('sendtoaddress', [address, coins]))
.then((txId) => fetch('gettransaction', txId)) .then((txId) => fetch('gettransaction', [txId]))
.then((res) => _.pick(res, ['fee', 'txid'])) .then((res) => _.pick(['fee', 'txid'], res))
.then((pickedObj) => { .then((pickedObj) => {
return { return {
fee: BN(pickedObj.fee).abs().shift(unitScale).round(), fee: BN(pickedObj.fee).abs().shift(unitScale).round(),