mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 01:41:36 +00:00
signer/core: verify safeTxHash when chain id is present in payload
This commit is contained in:
parent
eb67d61933
commit
b7811d2699
1 changed files with 3 additions and 3 deletions
|
|
@ -645,9 +645,9 @@ func (api *SignerAPI) SignGnosisSafeTx(ctx context.Context, signerAddress common
|
|||
gnosisTx.ChainId = (*math.HexOrDecimal256)(api.chainID)
|
||||
typedData = gnosisTx.ToTypedData()
|
||||
sighash, _, _ = apitypes.TypedDataAndHash(typedData)
|
||||
if !bytes.Equal(sighash, gnosisTx.InputExpHash.Bytes()) {
|
||||
return nil, fmt.Errorf("mismatched safeTxHash; have %#x want %#x", sighash, gnosisTx.InputExpHash[:])
|
||||
}
|
||||
}
|
||||
if !bytes.Equal(sighash, gnosisTx.InputExpHash.Bytes()) {
|
||||
return nil, fmt.Errorf("mismatched safeTxHash; have %#x want %#x", sighash, gnosisTx.InputExpHash[:])
|
||||
}
|
||||
}
|
||||
signature, preimage, err := api.signTypedData(ctx, signerAddress, typedData, msgs)
|
||||
|
|
|
|||
Loading…
Reference in a new issue