Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
TJW8812031314 opened this issue Jun 12, 2024 · 4 comments

Comments

@TJW8812031314
Copy link

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

@Lloyd1229
Copy link

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

找到方法了吗?

@TJW8812031314
Copy link
Author

没有,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
Copy link

Lloyd1229 commented Jul 3, 2024 via email

@xwartz
Copy link
Collaborator

xwartz commented Jul 4, 2024

imToken 没有暴露相关属性

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants