1 min readOct 1, 2018
Currently, above code works if you use eth_signTypedData
. As such, the quick and dirty way to go about it is to monitor MetaMask releases to update your dApp to use eth_signTypedData_v1
once it’s supported.
A more elegant solution would be to gracefully handle the errors it throws to use eth_signTypedData
before the changeover, and eth_signTypedData_v1
after. Untested pseudocode:
try signing with eth_signTypedData_v1
if it fails, try signing with eth_signTypedData