crypto-com / chain-desktop-wallet

Crypto.com DeFi Desktop Wallet
https://crypto.com/defi-wallet
Other
362 stars 112 forks source link

Problem: Fix non-hex message signing through walletConnect #1273

Closed crypto-matto closed 1 year ago

crypto-matto commented 1 year ago

Issue

Message signing should often comes in Hex

螢幕截圖 2022-11-03 下午5 43 01

But for some scenario, when a non-Hex string pass to WalletConnect, spaces got trimmed:

image (2) image

Tracing back to the source, it's the WalletConnect Class from lib @walletconnect causing the issue.

XinyuCRO commented 1 year ago

I think it's not a issue, DApp should follow the spec and pass the hexed string instead

crypto-matto commented 1 year ago

I think it's not a issue, DApp should follow the spec and pass the hexed string instead

Agree. So far I also see DApps are usually passing hex string. I'll update this as a safety measure though. I've reflected this to @damoncro to consider hexing the string before passing the message in his service, as not sure if some other wallets will be missing the handling of this issue as well~