2

I am using the latest implementation of EIP712 to ask for user to confirm some action:

        web3.currentProvider.sendAsync({
            method: "eth_signTypedData_v4",
            params: [account, dataToSign],
            from: account
        }

with:

        const metaTransactionType = [
            { name: "permission", type: "string" }
        ];
        ...
        let message = {
            permission: "Hello world"
        };
        ...
        const dataToSign = JSON.stringify({
            types: {
                EIP712Domain: domainType,
                MetaTransaction: metaTransactionType
            },
            domain: domainData,
            primaryType: "MetaTransaction",
            message: message
        });

And everything works fine, but the Metamask pop up shows the word "Message" twice: enter image description here

Metamask version is 8.1.5 (the latest I believe). Is this a bug or am I constructing the data to sign wrong?

Thanks!

1

This is the normal behavior. I also had the word "Message" showing up twice when working with EIP-712 a few months ago.

I tried at the time to modify the variable "message" in the js code but it was useless. I believe there is currently no way to change this.

It would indeed be an interesting feature to customize this Metamask window.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.