Skip to content

Commit

Permalink
accounts/usbwallet: fix ledger version check (ethereum#21733)
Browse files Browse the repository at this point in the history
The version check logic did not take into account the second digit (i.e. the '4' in v1.4.0) - this one line patch corrects this.
  • Loading branch information
svenski123 authored and enriquefynn committed Feb 15, 2021
1 parent 63e109f commit b12e29e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion accounts/usbwallet/ledger.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (w *ledgerDriver) SignTx(path accounts.DerivationPath, tx *types.Transactio
return common.Address{}, nil, accounts.ErrWalletClosed
}
// Ensure the wallet is capable of signing the given transaction
if chainID != nil && w.version[0] <= 1 && w.version[2] <= 2 {
if chainID != nil && w.version[0] <= 1 && w.version[1] <= 0 && w.version[2] <= 2 {
//lint:ignore ST1005 brand name displayed on the console
return common.Address{}, nil, fmt.Errorf("Ledger v%d.%d.%d doesn't support signing this transaction, please update to v1.0.3 at least", w.version[0], w.version[1], w.version[2])
}
Expand Down

0 comments on commit b12e29e

Please sign in to comment.