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

Issue with action sign-personal-message with Slush Web Wallet

Open binhnguyen2501 opened this issue 8 months ago • 9 comments

I got issue try to sign-personal-message with Slush Web Wallet then the network params from url is devnet but when I defineSlushWallet the network was already set to mainnet

link sign-personal-message (can see the default network params from url is devnet)

Image

And here is response of useWallet hook look like the network is "unknown:unknown"

Image

binhnguyen2501 avatar Apr 28 '25 16:04 binhnguyen2501

Demo error cannot verify message though Slush Web Wallet https://www.loom.com/share/2e199bf55d4f4688a25f1a433c68443a?sid=2791d5e9-ecdf-465e-9db9-0a1431afeb9d

toannhu96 avatar Apr 29 '25 00:04 toannhu96

I'm meeting the same problem

hkhangus avatar Apr 29 '25 04:04 hkhangus

@binhnguyen2501 Thanks for reporting the issue. The unknown issue happens when your chain setting at the WalletProvider does not include the chain of the connected wallet (devnet of Slush web wallet in this case). if you want to develop your dapp on devnet with Slush web wallet, I'd recommend you making sure that your chain setting at the WalletProvider includes SuiDevnetChain (or remove the setting to let it be default which includes both Sui dev, test and mainnet). See docs here.

bruceeewong avatar Apr 30 '25 14:04 bruceeewong

Demo error cannot verify message though Slush Web Wallet https://www.loom.com/share/2e199bf55d4f4688a25f1a433c68443a?sid=2791d5e9-ecdf-465e-9db9-0a1431afeb9d

@toannhu96 Thanks for reporting this. Are you using the verifySignedMessage of useWallet? If yes, then it is indeed an issue that we recently found. We are working on this, and will release a new patch for this soon.

bruceeewong avatar Apr 30 '25 14:04 bruceeewong

I'm meeting the same problem

@hkhangus Refer to the answer above. Thanks!

bruceeewong avatar Apr 30 '25 14:04 bruceeewong

Demo error cannot verify message though Slush Web Wallet https://www.loom.com/share/2e199bf55d4f4688a25f1a433c68443a?sid=2791d5e9-ecdf-465e-9db9-0a1431afeb9d

@toannhu96 Thanks for reporting this. Are you using the verifySignedMessage of useWallet? If yes, then it is indeed an issue that we recently found. We are working on this, and will release a new patch for this soon.

Yes, looking forward to it! Thanks for the update.

toannhu96 avatar Apr 30 '25 15:04 toannhu96

Demo error cannot verify message though Slush Web Wallet https://www.loom.com/share/2e199bf55d4f4688a25f1a433c68443a?sid=2791d5e9-ecdf-465e-9db9-0a1431afeb9d

@toannhu96 Thanks for reporting this. Are you using the verifySignedMessage of useWallet? If yes, then it is indeed an issue that we recently found. We are working on this, and will release a new patch for this soon.

Yes, looking forward to it! Thanks for the update.

@toannhu96 Hi, here are the two updates: First, to answer your question, we found that Slush web wallet has some issues in its logic of signing personal messages, which could not be verified by the function from the official sui ts sdks. See issue here: https://github.com/MystenLabs/sui/issues/22032

Second, a new version v0.3.8 has been released to introduce a new function called "verifySignedPersonalMessage", which is enhanced to support signature verification from different signature schemes. details see doc: https://kit.suiet.app/docs/Hooks/useWallet#verifysignedpersonalmessage

So I would suggest you updating the kit to v0.3.8 and update your verify function, once Slush web team fixes the issue, you should be all good.

bruceeewong avatar May 02 '25 02:05 bruceeewong

Demo error cannot verify message though Slush Web Wallet https://www.loom.com/share/2e199bf55d4f4688a25f1a433c68443a?sid=2791d5e9-ecdf-465e-9db9-0a1431afeb9d

@toannhu96 Thanks for reporting this. Are you using the verifySignedMessage of useWallet? If yes, then it is indeed an issue that we recently found. We are working on this, and will release a new patch for this soon.

Yes, looking forward to it! Thanks for the update.

@toannhu96 Hi, here are the two updates: First, to answer your question, we found that Slush web wallet has some issues in its logic of signing personal messages, which could not be verified by the function from the official sui ts sdks. See issue here: MystenLabs/sui#22032

Second, a new version v0.3.8 has been released to introduce a new function called "verifySignedPersonalMessage", which is enhanced to support signature verification from different signature schemes. details see doc: https://kit.suiet.app/docs/Hooks/useWallet#verifysignedpersonalmessage

So I would suggest you updating the kit to v0.3.8 and update your verify function, once Slush web team fixes the issue, you should be all good.

Thank you for your update

toannhu96 avatar May 02 '25 05:05 toannhu96

Demo error cannot verify message though Slush Web Wallet https://www.loom.com/share/2e199bf55d4f4688a25f1a433c68443a?sid=2791d5e9-ecdf-465e-9db9-0a1431afeb9d

@toannhu96 Thanks for reporting this. Are you using the verifySignedMessage of useWallet? If yes, then it is indeed an issue that we recently found. We are working on this, and will release a new patch for this soon.

Yes, looking forward to it! Thanks for the update.

@toannhu96 Hi, here are the two updates: First, to answer your question, we found that Slush web wallet has some issues in its logic of signing personal messages, which could not be verified by the function from the official sui ts sdks. See issue here: MystenLabs/sui#22032

Second, a new version v0.3.8 has been released to introduce a new function called "verifySignedPersonalMessage", which is enhanced to support signature verification from different signature schemes. details see doc: https://kit.suiet.app/docs/Hooks/useWallet#verifysignedpersonalmessage

So I would suggest you updating the kit to v0.3.8 and update your verify function, once Slush web team fixes the issue, you should be all good.

Still got issue when signMessage with network is devnet. Could you please take a look this issue @bruceeewong and my @suiet/wallet-kit version I'm using is ^0.4.1

https://my.slush.app/sign-personal-message?requestId=ca05e8be-588a-41ea-9827-5084dbb36cc6&appUrl=https%3A%2F%2Fapp.getnimbus.io%2F&appName=Nimbus&accountAddress=0xadd85d3758510514a8ccd580d60943d0ea5a75d3d1fc0a18e97cdc1c79d90874&network=devnet&bytes=SSBhbSBzaWduaW5nIG15IG9uZS10aW1lIG5vbmNlOiAyNTY5&hash=eyJ2ZXJzaW9uIjoiMSIsInJlcXVlc3RJZCI6ImNhMDVlOGJlLTU4OGEtNDFlYS05ODI3LTUwODRkYmIzNmNjNiIsImFwcFVybCI6Imh0dHBzOi8vYXBwLmdldG5pbWJ1cy5pby8iLCJhcHBOYW1lIjoiTmltYnVzIiwicGF5bG9hZCI6eyJ0eXBlIjoic2lnbi1wZXJzb25hbC1tZXNzYWdlIiwibWVzc2FnZSI6IlNTQmhiU0J6YVdkdWFXNW5JRzE1SUc5dVpTMTBhVzFsSUc1dmJtTmxPaUF5TlRZNSIsImFkZHJlc3MiOiIweGFkZDg1ZDM3NTg1MTA1MTRhOGNjZDU4MGQ2MDk0M2QwZWE1YTc1ZDNkMWZjMGExOGU5N2NkYzFjNzlkOTA4NzQiLCJzZXNzaW9uIjoiZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKd1lYbHNiMkZrSWpwN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