Skip to content

Conversation

@cgero-eth
Copy link

The chainId attribute of the EIP-712 messages should be a number and not a string as specified on the spec:

uint256 chainId the EIP-155 chain id. The user-agent should refuse signing if it does not match the currently active chain.

The latest ^5 version of EthersJs still parses the chainId attribute to a string (see code here) and this has only been fixed on the new ^6 version (see here).

As these EIP-712 messages have the chainId set as string, the Wagmi library throws an error when trying to sign the typed message because "1" !== 1 (see signTypedData and assetActiveChain)

Please consider having a look at this PR as I suppose that a migration to Ethersjs v6 is not coming soon 🙏🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant