consenlabs / webview

WebView utils for imToken application v2.
MIT License
9 stars 11 forks source link

imToken 钱包 DAPP 开发如何区分观察钱包?有什么API来区分观察钱包与普通钱包 #81

Open TJW8812031314 opened 3 weeks ago

TJW8812031314 commented 3 weeks ago

当我使用imToken 开发DAPP项目, 切换到波场链,获取钱包地址用于登录平台,如何辨别观察钱包还是普通钱包从而显示不同平台数据

Lloyd1229 commented 2 weeks ago

当我使用imToken 开发DAPP项目, 切换到波场链,获取钱包地址用于登录平台,如何辨别观察钱包还是普通钱包从而显示不同平台数据

找到方法了吗?

TJW8812031314 commented 1 week ago

没有,TP钱包有相关的API


        const {data} = await tp.getCurrentWallet();
        console.log(data);
    }

    data==> 
    {
        address: "0x09B6B38115EF43b1744AeB944DF1f4E9DEAd93B9",
        blockchain: -1,
        blockchain_id: -1,
        name: "观察钱包",
        node: "https://***.com",
        ns: "ethereum",
        walletType: "observeWallet"
}```
通过判断wallType 类型来判断是否为观察钱包
Lloyd1229 commented 1 day ago

tp我知道

---原始邮件--- 发件人: @.> 发送时间: 2024年6月25日(周二) 下午3:05 收件人: @.>; 抄送: @.**@.>; 主题: Re: [consenlabs/webview] imToken 钱包 DAPP 开发如何区分观察钱包?有什么API来区分观察钱包与普通钱包 (Issue #81)

没有,TP钱包有相关的API const {data} = await tp.getCurrentWallet(); console.log(data); } data==> { address: "0x09B6B38115EF43b1744AeB944DF1f4E9DEAd93B9", blockchain: -1, blockchain_id: -1, name: "观察钱包", node: "https://***.com", ns: "ethereum", walletType: "observeWallet" }``` 通过判断wallType 类型来判断是否为观察钱包

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

xwartz commented 20 hours ago

imToken 没有暴露相关属性