accounts/usbwallet: fix double hashing in SignTextWithPassphrase (#33138)

SignTextWithPassphrase calls SignText, which already performs TextHash.
This commit is contained in:
Lucia 2025-11-27 02:58:15 +13:00 committed by Alvarez
parent bf41c073fd
commit 8f17a97bc4

View file

@ -632,7 +632,7 @@ func (w *wallet) SignTx(account accounts.Account, tx *types.Transaction, chainID
// data is not supported for Ledger wallets, so this method will always return // data is not supported for Ledger wallets, so this method will always return
// an error. // an error.
func (w *wallet) SignTextWithPassphrase(account accounts.Account, passphrase string, text []byte) ([]byte, error) { func (w *wallet) SignTextWithPassphrase(account accounts.Account, passphrase string, text []byte) ([]byte, error) {
return w.SignText(account, accounts.TextHash(text)) return w.SignText(account, text)
} }
// SignTxWithPassphrase implements accounts.Wallet, attempting to sign the given // SignTxWithPassphrase implements accounts.Wallet, attempting to sign the given