Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.

Commit

Permalink
Merge pull request #2011 from OpenCommunityCoin/trezor-chainid-fix
Browse files Browse the repository at this point in the history
support  full 32bit chain_id for trezor
  • Loading branch information
gamalielhere authored Aug 24, 2018
2 parents 7d64214 + 288bd35 commit 49d9b44
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/scripts/uiFuncs.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ uiFuncs.signTxTrezor = function(rawTx, txData, callback) {
return;
}

// check the returned signature_v and recalc signature_v if it needed
// see also https://github.com/trezor/trezor-mcu/pull/399
if (result.v <= 1) {
// for larger chainId, only signature_v returned. simply recalc signature_v
result.v += 2 * rawTx.chainId + 35;
}

rawTx.v = "0x" + ethFuncs.decimalToHex(result.v);
rawTx.r = "0x" + result.r;
rawTx.s = "0x" + result.s;
Expand Down

0 comments on commit 49d9b44

Please sign in to comment.