You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
inside of a JsonRpcProvider, when we call the signTypedData function, the domain.chainId is always formatted as a hex number, even if the number is a safe Integer
During the encoding process, this function is used to encode chainId. However, Number.isSafeInteger(BigInt) is always returning false. So the result is transformed by using toQuantity that is writing the chainId as an hexString.
As a consequence, some browser wallets such as wallet connect & frame wallet cannot decode the chain id correctly.
Ethers Version
6
Search Terms
TypedData Encoder domain signing message
Describe the Problem
inside of a
JsonRpcProvider
, when we call thesignTypedData
function, thedomain.chainId
is always formatted as a hex number, even if the number is a safe IntegerDuring the encoding process, this function is used to encode chainId. However,
Number.isSafeInteger(BigInt)
is always returning false. So the result is transformed by usingtoQuantity
that is writing the chainId as an hexString.As a consequence, some browser wallets such as wallet connect & frame wallet cannot decode the chain id correctly.
Code Snippet
You should do something like that:
Contract ABI
No response
Errors
No response
Environment
node.js (older than v12), Browser (Chrome, Safari, etc)
Environment (Other)
No response
The text was updated successfully, but these errors were encountered: