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.
Can you give me some ideas on how to address this?