secret.js
secret.js copied to clipboard
Invalid permit signature generated with MetaMaskWallet signAmino
When I use metamask to try and generate a permit. I'm getting "Failed to verify signatures for the given permit" when trying to use the permit. I think it might have to do with pretty printing the json before converting to hex:
https://github.com/scrtlabs/secret.js/blob/898529e3eed558e29fe927338223fded18120dd4/src/wallet_metamask.ts#L113
Which would make the computed hashes different when the signature is generated, I would think.
Permits are not supported with MetaMask at the moment. I have a workaround but it's ugly 🤔