Signing message with ethers.js

Iā€™d like my app to perform different functions depending on whether the user has signed or not.
This feature will be developed using the coinbase wallet SDK and ethers.js.

  const getSign = (provider: ethers.providers.Web3Provider, address: string) => {
    const message = "sign message";
    const signer = provider.getSigner(address);

    signer
      .signMessage(message)
      .then(() => console.log("signed"))
      .catch(() => console.log("sign cancelled"));
  };

If I cancel the signature in my coinbase wallet application, this works fine, but if I cancel the transaction in my web, it is treated as if I signed it.

į„‰į…³į„į…³į„…į…µį†«į„‰į…£į†ŗ 2023-05-18 į„‹į…©į„’į…® 5.28.24

Can you give me some ideas on how to address this?

Hello @2pandi! Welcome to the forum community.
Thank you for taking an interest in trying out Coinbase APIs. We appreciate you sharing this with us. Can you share more screenshots of the transactions still being treated as signed on web even after cancellation? So that we can share this with our team.

į„’į…Ŗį„†į…§į†«-į„€į…µį„…į…©į†Ø-2023-05-22-į„‹į…©į„Œį…„į†«-9.46.59

please check this out

Any updates on this?

Hi @2pandi! Apologies for the delay in response. We have reached out to our internal teams regarding this. We will soon share an update regarding this. Keep in touch.

1 Like

Hey @2pandi Just wanted to keep you informed that we are trying to resolve this and have escalated it to our internal teams to look upon already. While we are unable to provide any timelines to resolve this. We are trying our best to find a solution for this as soon as possible. Meanwhile we will appreciate your patience in this matter. We will keep you informed in case there are any development on this.

1 Like

Hey @2pandi! May we ask which browser console are you using? Our team was facing a few issues as it closes when we cancel the transaction. Can you share how are you testing this on your end?

Thank you for not forgetting my inquiry and for your attention.
I used the Chrome browser to test this feature.

1 Like