Leon

Results 19 comments of Leon

In what scenarios do you need to determine whether the user is using a software wallet or a hardware wallet?

Thanks for the feedback! I think a more reasonable approach would be for OneKey Wallet to support TronSignMessage in the SDK first — right? #7735

现在软件钱包也不支持 Tron 的 SignMessage,你们在开发时是怎么 workaround 的呢?

不完全一样,两者在处理消息方式上存在差异: - OneKey 硬件钱包在调用 tronSignMessage 时,会对传入的原始消息做一次 sha256,然后对哈希值进行签名。 - TronLink 的 signMessage 方法则是直接签名传入的消息(比如已经是 sha256 后的结果) 因此,如果希望在 TronLink 中复现与 OneKey 硬件钱包相同的签名结果,可以尝试对 rawMessage(例如 "Hello World")做一次 sha256

- 使用 TronLink 的时候才需要 hash 一次 - 调用硬件直接把 `Hello` 用 utf-8 encode 后传入

暂时没法识别,只能在 Tron 链添加 wallet api 来识别