Cannot read properties of undefined (reading 'EIP712Domain')
AndonMitev opened this issue · 4 comments
AndonMitev commented
I'm signing most of the messages but today i've faced issue that i was not able to sign and i receive this error any idea:
Cannot read properties of undefined (reading 'EIP712Domain')
AndonMitev commented
AndonMitev commented
And this how the message looks like that is passed from OpenSea to me:
{"primaryType": "MetaTransaction", "types": {"EIP712Domain": [{"name": "name", "type": "string"}, {"name": "version", "type": "string"}, {"name": "verifyingContract", "type": "address"}, {"name": "salt", "type": "bytes32"}], "MetaTransaction": [{"name": "nonce", "type": "uint256"}, {"name": "from", "type": "address"}, {"name": "functionSignature", "type": "bytes"}]}, "domain": {"name": "Wrapped Ether", "version": "1", "verifyingContract": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619", "salt": "0x0000000000000000000000000000000000000000000000000000000000000089"}, "message": {"nonce": 0, "from": "0xe6329913560ff9ca1b3b44ebaef08f0304b36f07", "functionSignature": "0x095ea7b3000000000000000000000000411b0bcf1b6ea88cb7229558c89994a2449c302cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"}}
mcmire commented
Sorry, it's not entirely clear to me from your screenshot how you're using this library — do you mind providing a more complete example?
AndonMitev commented
Oh i had to JSON.parse data :X