Skip to content

Commit

Permalink
Merge pull request #2148 from OpenCommunityCoin/trezor-full-32bit-cha…
Browse files Browse the repository at this point in the history
…inid

support full 32bit chainId for Trezor
  • Loading branch information
ConnorBryan authored Sep 4, 2018
2 parents c75814e + 615f7ba commit f011fd5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions common/libs/wallet/deterministic/trezor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ export class TrezorWallet extends HardwareWallet {
return reject(Error(result.error));
}

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

// TODO: Explain what's going on here? Add tests? Adapted from:
// https://github.com/kvhnuke/etherwallet/blob/v3.10.2.6/app/scripts/uiFuncs.js#L24
const txToSerialize: TxObj = {
Expand Down

0 comments on commit f011fd5

Please sign in to comment.