Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

Detect dapp browser custom button #414

Conversation

jackjdleslie
Copy link
Contributor

@jackjdleslie jackjdleslie commented Sep 20, 2018

Notes

With this pull request, these are the following flows:

  1. Using Safari, go to manager and you will be given the download option for Trust Wallet, or use WalletConnect (janky qr code version for now)
  2. Using Trust Wallet, go to manager and you will be given the connect option for Trust Wallet, WalletConnect option hidden
  3. Using Status, go to manager and you will be given the connect option for Status, WalletConnect option hidden
  4. Using other dapp browser (e.g Coinbase Wallet), go to manager and you will be given the default connect option for dapp browsers, WalletConnect option hidden

In terms of the changes to the code, note that

  1. There is a new helpers/dappbrowser.js file, the web3 detection methods might not be substantial enough.
  2. In the same file i've also included objects containing the custom button information for Trust Wallet, Status, and a default option. I'm not sure if this is the best place for them, and eventually will need associated text from balance-common (for now I've manually entered English text and null values)
  3. There are two new methods in pages/index.js that handle which custom button should be shown on mobile, feel free to modify and optimise.

PR Checklist (check all)

  • Updated CHANGELOG.md to describe the included fixes and changes made
  • Included issue number on the description of the PR
  • Commented on the relevant issue thread about this PR

Issue number

#413
#291
#300

@ricburton
Copy link
Member

🙌 Preview this pull request.

Built with commit 4f0b59c

https://deploy-preview-414--balance-manager.netlify.com

This was referenced Sep 20, 2018
@jackjdleslie
Copy link
Contributor Author

The dappbrowser functions will need changed as of EIP-1102, read more here.

Where would be the best place for the await ethereum.enable(); request, in this repo or in balance-common?

@jinchung
Copy link
Contributor

Closing based on discussion and further changes required for 1102.

@jinchung jinchung closed this Sep 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants