0

I'm trying to sign data with web3 + metamask and get that signed data to my server. I ask to sign data, metamask prompt pop, I accept but then nothing happens?

Html :

<button class="button is-warning is-rounded" onclick="signData('Hello World')">SignIt</button>

Js :

    async function signData(index) {
        const account = await getCurrentAccount();
        let dataSign = await web3.eth.sign(index, account).then(console.log);
    }

How to retrieve signed hash so I can work with it ?

Your Answer

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

Browse other questions tagged or ask your own question.