Skip to content

Ethers v6 signTypedData signer mismatch issue #4720

Closed Answered by lidaamber
lidaamber asked this question in Q&A
Discussion options

You must be logged in to vote

The issue was resolved by changing uint type in the typehash to explicit uint256 type in Solidity, with the same change to type used in Ethers-using code:

bytes32 public constant ORDER_REQUEST_TYPEHASH =
        keccak256(
            "OrderRequest(address buyer,uint orderType,uint amount,uint paymentTokenAmount,uint timestamp,bytes32 nonce)"
        );

to

bytes32 public constant ORDER_REQUEST_TYPEHASH =
        keccak256(
            "OrderRequest(address buyer,uint256 orderType,uint256 amount,uint256 paymentTokenAmount,uint256 timestamp,bytes32 nonce)"
        );

and on Ethers side

const types = {
  OrderRequest: [
    { name: 'buyer', type: 'address' },
    { name: 'orderType', type: '…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@anstormx
Comment options

Answer selected by lidaamber
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants