From 6680d7607782cefcf5c9c5542183903d5f4e8329 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Fri, 8 Nov 2024 14:39:41 +0100 Subject: [PATCH] accounts/usbwallet: fix sender derivation for new types --- accounts/usbwallet/ledger.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accounts/usbwallet/ledger.go b/accounts/usbwallet/ledger.go index 2a9085e864..2be6edd44f 100644 --- a/accounts/usbwallet/ledger.go +++ b/accounts/usbwallet/ledger.go @@ -397,8 +397,8 @@ func (w *ledgerDriver) ledgerSign(derivationPath []uint32, tx *types.Transaction if chainID == nil { signer = new(types.HomesteadSigner) } else { - signer = types.NewEIP155Signer(chainID) - // For EIP-1559 Tx, the V value is 0 or 1, so you don't need to subtract + signer = types.LatestSignerForChainID(chainID) + // For non-legacy transactions, V is 0 or 1, no need to subtract here. if tx.Type() == types.LegacyTxType { signature[64] -= byte(chainID.Uint64()*2 + 35) }