mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
accounts/usbwallet: correct version comparison logic (#32417)
## Description This PR fixes a bug in the Ledger hardware wallet version validation logic for EIP-155 transaction signing. The original condition incorrectly allowed older versions that don't support EIP-155 such as 0.9.9 and 0.1.5 to proceed.
This commit is contained in:
parent
39ab721992
commit
94ecd1db22
1 changed files with 1 additions and 1 deletions
|
|
@ -166,7 +166,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[1] <= 0 && w.version[2] <= 2 {
|
||||
if chainID != nil && (w.version[0] < 1 || (w.version[0] == 1 && w.version[1] == 0 && w.version[2] < 3)) {
|
||||
//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])
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue