Browse Source

Fix fees in the optimistic updates

master
Gaëtan Renaudeau 7 years ago
parent
commit
f54c63d2e8
  1. 6
      src/commands/libcoreSignAndBroadcast.js

6
src/commands/libcoreSignAndBroadcast.js

@ -208,13 +208,15 @@ export async function doSignAndBroadcast({
.asBitcoinLikeAccount() .asBitcoinLikeAccount()
.broadcastRawTransaction(Array.from(Buffer.from(signedTransaction, 'hex'))) .broadcastRawTransaction(Array.from(Buffer.from(signedTransaction, 'hex')))
const fee = builded.getFees().toLong()
// NB we don't check isCancelled() because the broadcast is not cancellable now! // NB we don't check isCancelled() because the broadcast is not cancellable now!
onOperationBroadcasted({ onOperationBroadcasted({
id: `${account.xpub}-${txHash}-OUT`, id: `${account.xpub}-${txHash}-OUT`,
hash: txHash, hash: txHash,
type: 'OUT', type: 'OUT',
value: transaction.amount, value: transaction.amount + fee,
fee: 0, fee,
blockHash: null, blockHash: null,
blockHeight: null, blockHeight: null,
senders: [account.freshAddress], senders: [account.freshAddress],

Loading…
Cancel
Save