Log miner fee (#237)

* Get miner fee written in some wallet plugins

* Return txid and fee for geth. possible problem with txid (zero hash on pending transaction)

* bitgo fee return

* Wallet apis fees save in cryptoAtoms
This commit is contained in:
Davit Abulashvili 2019-01-04 20:34:50 +04:00 committed by Josh Harvey
parent fa69956963
commit 163473a7ee
9 changed files with 64 additions and 4 deletions

View file

@ -57,7 +57,10 @@ function sendCoins (account, address, cryptoAtoms, cryptoCode) {
return wallet.send(params)
})
.then(result => {
return result.hash
let fee = parseFloat(result.transfer.feeString)
let txid = result.transfer.txid
return { txid: txid, fee: BN(fee).round() }
})
.catch(err => {
if (err.message === 'insufficient funds') throw new E.InsufficientFundsError()