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

如何获取用户的钱包地址?在手机端浏览器网页中能获取到吗? #21

Open
cssmagic opened this issue Jun 22, 2018 · 0 comments
Labels

Comments

@cssmagic
Copy link
Member

概述

目前唯一能获取用户钱包地址的方式是向 “星云钱包 Chrome 扩展” 询问。可以直接通过 postMessage() 的方式 与扩展交互,也可以使用 Nasa.js 的 Nasa.user.getAddr() 接口。

不过可惜的是,“星云钱包 Chrome 扩展” 很可能会在将来的版本中去除此功能。

手机端

由于手机端浏览器无法安装 “星云钱包 Chrome 扩展”,因此没有任何途径可以获取用户钱包地址。

解决方案

  • 在必要时向用户询问。
  • 当用户完成一笔交易(转账或调用合约)之后,可以获取付款方(from)的地址,也就是当前用户的钱包地址。
@cssmagic cssmagic added the FAQ label Jun 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant