How to call eth_signTypedData_v4 in integration test? #579
stefan-girlich
started this conversation in
General
Replies: 1 comment 2 replies
-
Root causeThe test setup I adapted from the wagmi codebase calls
Workaround
Possible aftereffectI expect on-chain operations (e.g. sending transactions) to fail since the wallet does not feature a provider. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to invoke different wagmi functions (e.g.
signTypedData
) in a Jest-driven test suite for integration testing. I want to sign some data and finally invoke a smart contract on Rinkeby.My test setup is largely derived from
wagmi
's codebase and just hardcodes Rinkeby as the chain to use. My test code callssignTypedData
and is supposed to invoke otherwagmi
functions in the future, including sending transactions.As of now, both RPC providers (Alchemy and Infura) will tell me that the method
eth_signTypedData_v4
is not available. Example response from Infura:const wallet = new Wallet({privateKey, address}); return provider.getSigner(wallet.address)
(see linked code). Since Metamask uses Infura by default, I assume that I am simply unauthorized to call eth_signTypedData_v4 via API. How would I provide the right auth information in this case?Thanks so much for your help!
Beta Was this translation helpful? Give feedback.
All reactions