Skip to content

Commit

Permalink
[trezor] Send sequence for prevtx inputs (#2362)
Browse files Browse the repository at this point in the history
The sequence field for inputs of prevtxs was not being sent to the device,
causing a failure to verify that the hash of the previous transaction and its
contents matched.

This error could be triggered if the trezor wallet received funds from a
non-dcrwallet sender that did not set the Sequence field of the authored
transaction to MaxTxInSequenceNum.
  • Loading branch information
matheusd authored and alexlyp committed Dec 9, 2019
1 parent 0907629 commit 0b8f68f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions app/actions/TrezorActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,10 +455,6 @@ export const walletTxToBtcjsTx = (tx, changeIndex, inputTxs) => async (dispatch,
address_n: addressPath(addrIndex, addrBranch, WALLET_ACCOUNT,
chainParams.HDCoinType),
decred_tree: inp.getTree()

// FIXME: this needs to be supported on trezor.js.
// decredTree: inp.getTree(),
// decredScriptVersion: 0,
});
}

Expand Down Expand Up @@ -509,11 +505,8 @@ export function walletTxToRefTx(tx) {
amount: inp.getAmountIn(),
prev_hash: rawHashToHex(inp.getPreviousTransactionHash()),
prev_index: inp.getPreviousTransactionIndex(),
decred_tree: inp.getTree()

// TODO: this needs to be supported on trezor.js
// decredTree: inp.getTree(),
// decredScriptVersion: 0,
decred_tree: inp.getTree(),
sequence: inp.getSequence()
}));

const bin_outputs = tx.getOutputsList().map(outp => ({
Expand Down

0 comments on commit 0b8f68f

Please sign in to comment.