wallet-kit icon indicating copy to clipboard operation
wallet-kit copied to clipboard

signPersonalMessage can't result valid signature

Open chaoyi7 opened this issue 1 year ago • 1 comments

Problem

Can @suiet/wallet-kit support wallet switch?

simple code below

wallet.adapter?.signPersonalMessage({ account: account!, message: new TextEncoder().encode('HelloXXX') })

Let's say I've logged in to a wallet now, and there's a ListBox comp in the upper right corner of my page to switch wallet addresses, when I switch, I call thesignPersonalMessage method, and then request the API after getting the signature, but I find that I can't get a valid signature using SignPersonalMessage

const verifyResult = await wallet.verifySignedMessage(res, account.publicKey)
console.log('verify signedMessage', verifyResult)  // is false

chaoyi7 avatar Mar 08 '24 07:03 chaoyi7

Hi, currently our wallet kit does not support wallet switching from the DApp side. May I know how do you implement the switching logic? Can you also verify if the account of the "account.publicKey" is the one that the DApp connects to?

bruceeewong avatar Mar 13 '24 13:03 bruceeewong

Close due to no response for a long time.

bruceeewong avatar Jun 08 '24 03:06 bruceeewong