Skip to content

Commit b12e29e

Browse files
svenski123enriquefynn
authored andcommitted
accounts/usbwallet: fix ledger version check (ethereum#21733)
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.
1 parent 63e109f commit b12e29e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

accounts/usbwallet/ledger.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func (w *ledgerDriver) SignTx(path accounts.DerivationPath, tx *types.Transactio
162162
return common.Address{}, nil, accounts.ErrWalletClosed
163163
}
164164
// Ensure the wallet is capable of signing the given transaction
165-
if chainID != nil && w.version[0] <= 1 && w.version[2] <= 2 {
165+
if chainID != nil && w.version[0] <= 1 && w.version[1] <= 0 && w.version[2] <= 2 {
166166
//lint:ignore ST1005 brand name displayed on the console
167167
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])
168168
}

0 commit comments

Comments
 (0)