-
Notifications
You must be signed in to change notification settings - Fork 179
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
feat: walletconnect wallet #1733
feat: walletconnect wallet #1733
Conversation
@0xdef1cafe will need product review for user flow when clicking WalletConnect option |
@GMSteuart I suppose this needs linking with shapeshift/hdwallet#529 for now, could you add some instructions for local testing until |
Also, seems like the diff touches many files/lines that shouldn't be modified by this PR, rebase/merge might help 👀 |
Ya, I can add local testing steps, one of those will have to be running the associated hdwallet-walletconnect package that isn't published yet. |
Oh fun. lol. Glad I'm finding out earlier in the day rather than later. Thanks for pointing that out. 🙂 |
Built, linked, and ran web off the hdwallet PR branch but I'm seeing this, so I'm wondering whether or not there are more steps or something I missed: |
…ure-walletconnect-wallet
…ure-walletconnect-wallet
bumping this, any updates here @GMSteuart ser? |
…ure-walletconnect-wallet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trust Wallet (derived ETH Account with ETH only):
- Accounts/Account/Asset pages are properly working and showing the wallet ETH amount
- Portfolio balance is properly shown
- Tried an ETH self-send which properly went through, however, I'm getting a "User rejected the transaction" toast
- Can't see any Tx history
MetaMask Wallet (derived ETH Account with ETH and ERC-20s):
- Accounts/Account/Asset pages are properly working and showing the wallet ETH and ERC-20s amount
- Portfolio balance is properly shown
- Tried an ETH self-send which properly went through, however, I'm getting a "User rejected the transaction" toast
- Can't see any Tx history
Keplr Mobile
Keplr also supports WalletConnect, and can be used to connect to e.g osmosis.zone. It isn't supported at all as the app is effectively in full skeleton mode for dashboard and has no loaded accounts in state.
Do we want to handle the case of Keplr Mobile (and Cosmos/Osmosis accounts derivation in WalletConnect) not being supported, by having some UX for it?
This is because WalletConnect 1.0 (the version we've implemented in HDWallet) is ETH-only. WalletConnect 2.0 has multi-chain support but is still in beta. I'm currently looking to see if it is possible to either detect the user wallet connected on the other side of the WalletConnect bridge or to limit the set of wallets supported by the application via WalletConnect. |
…ure-walletconnect-wallet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested it again and managed to get connect, disconnect, and Txs (swaps/sends) working. Note that I didn't continue with actually broadcasting Txs and rejected the Tx confirm popup.
Only thing I've noticed is a little styling issue, we're missing right padding on the WalletConnect option but we can tackle it as a smallish follow-up. LGTM otherwise!
Approving this one even though this is still waiting for a product copy update, I'll re-stamp after. Logic looks good with the latest commits, good job ser!
🍬
…ure-walletconnect-wallet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested again with the latest changes, both the "Ethereum only" copy and WalletConnect option button look good.
🍬
merging as previously approved by @gomesalexandre and the most recent commit was stylistic/trivial |
* feat: init walletconnect integration * chore: lint * fix: wallet init * fix: wallet init * fix: add imagedelivery to headers * chore: use package version * chore: show/hide WalletConnect based on flag * fix: headers for macos/ios safari * fix: show feature flag nav item for alt host * perf: add env var for better local development * chore: remove unecessary code * chore: remove package dep * chore: add hdwallet-walletconnect alpha dependency * fix: add walletconnect csp entries * fix: utilize feature flag * fix: add mobileEnabled field to WalletConnect config * chore: run linter * fix: remove usage of process.env * chore: run linter * fix: apply code review suggestions * fix: use structured logging * fix: apply code review suggestions * fix: update csp for wallet logos * chore: add flag to sample.env * chore: yarn.lock * docs: fleek info * fix: img source csp * chore: revert readme to develop * fix: image fetched by walletconnect * feat: WalletConnect rejection * chore: lint * chore: lint * chore: update hdwallet-walletconnect dependency * chore: upgrade hdwallet-walletconnect * fix: set wc connect modal error to null on init * chore: run linter * fix: walletconnect refresh bug * chore: upgrade hdwallet dependency * chore: bump hdwallet dependencies * fix: csp for walletconnect desktop logos * chore: bump hdwallet package versions * fix: disable trade max with walletconnect * fix: disable sendmax with walletconnect * chore: run linter * chore: update hdwallet dependencies * chore: run linter * fix: hide fiat sendMax with WalletConnect * fix: stylistic changes * fix: typo * feat: add copy to walletconnect option in selectmodal * fix: constrain icon width for selectmodal options * fix: update return value Co-authored-by: pastaghost <[email protected]> Co-authored-by: 0xdef1cafe <[email protected]>
* chore: update packages * chore: add new headers * feat: add new translations * feat: add fiat market data * feat: fetch fiat market data in app context * chore: blacklist large things from redux store * fix: more correct type defs and balance chart fixes * chore: fix headers comment * chore: consolidate to priceAtDate * chore: only upgrade market service package * chore: use same source of truth for mock test data as real data structure * fix: optimizations and bug fixes * fix: market data refetch * chore: rename booleans for readability * chore: tighter type def for setFiatMarketData * chore: freeze initial price history for safety * chore: uppercase const * chore: consistent market data selector naming * feat: view layer changes to support multi currency display * feat: add currency selection to settings modal * chore: add multi currency feature flag * feat: balance chart changes * chore: delete duplicate test with wrong file extension * chore: cache fee asset selector * Revert "chore: cache fee asset selector" This reverts commit dfcd3d0. * fix: revert chart loading behaviour * fix: default fiatType to USD * test: fix useLocaleFormatter test * chore: delete unnecessary locale renderers * chore: revert unnecessary changes to locale formatter * fix: improved number formatting * feat: currency format settings * fix: test case fixed * fix: improved input parsing * chore: fix typo * feat: walletconnect wallet (#1733) * feat: init walletconnect integration * chore: lint * fix: wallet init * fix: wallet init * fix: add imagedelivery to headers * chore: use package version * chore: show/hide WalletConnect based on flag * fix: headers for macos/ios safari * fix: show feature flag nav item for alt host * perf: add env var for better local development * chore: remove unecessary code * chore: remove package dep * chore: add hdwallet-walletconnect alpha dependency * fix: add walletconnect csp entries * fix: utilize feature flag * fix: add mobileEnabled field to WalletConnect config * chore: run linter * fix: remove usage of process.env * chore: run linter * fix: apply code review suggestions * fix: use structured logging * fix: apply code review suggestions * fix: update csp for wallet logos * chore: add flag to sample.env * chore: yarn.lock * docs: fleek info * fix: img source csp * chore: revert readme to develop * fix: image fetched by walletconnect * feat: WalletConnect rejection * chore: lint * chore: lint * chore: update hdwallet-walletconnect dependency * chore: upgrade hdwallet-walletconnect * fix: set wc connect modal error to null on init * chore: run linter * fix: walletconnect refresh bug * chore: upgrade hdwallet dependency * chore: bump hdwallet dependencies * fix: csp for walletconnect desktop logos * chore: bump hdwallet package versions * fix: disable trade max with walletconnect * fix: disable sendmax with walletconnect * chore: run linter * chore: update hdwallet dependencies * chore: run linter * fix: hide fiat sendMax with WalletConnect * fix: stylistic changes * fix: typo * feat: add copy to walletconnect option in selectmodal * fix: constrain icon width for selectmodal options * fix: update return value Co-authored-by: pastaghost <[email protected]> Co-authored-by: 0xdef1cafe <[email protected]> * chore(deps): bump terser from 4.8.0 to 4.8.1 (#2197) Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1. - [Release notes](https://github.com/terser/terser/releases) - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/commits) --- updated-dependencies: - dependency-name: terser dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: dogecoin (#2185) * feat: dogecoin initial * add dogecoin * use p2pkh accountType for dgubs add dogecoin else if to handleSend :( add dogecoin case to handleSendMax :( :( * wrap doge plugin in a feature flag * pass chainId to utxoAccountParams * remove reference to dogecoin testnet * web clean up * fix: update old utility to new caip method * chore: add REACT_APP_FEATURE_DOGECOIN=true to sample.env * fix: update swapper logic to pass correct param * chore: version bump doge libs * fix: add dogecoin label to accounts page * fix: don't show tokens under dogecoin account Co-authored-by: 0xdef1cafe <[email protected]> Co-authored-by: Apotheosis <[email protected]> * fix: typo and lodash import * fix: conflict resolved * feat: keeping order of fiat currencies and currency formats * fix: applying suggested changes Co-authored-by: stackedQ <[email protected]> Co-authored-by: Grant Steuart <[email protected]> Co-authored-by: pastaghost <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Adam Samere <[email protected]> Co-authored-by: Apotheosis <[email protected]> Co-authored-by: reallybeard <[email protected]>
Description
Integrates WalletConnect wallet
UPDATE: Moved the provider object from hdwallet over to web since there is a scenario where the connect modal will hang indefinitely and there is no graceful way to automatically exit on behalf of the user. This indefinite situation occurs after the QR modal pops up and the user rejects the session. The reason this occurs is because the connector at the time is only listening for
connect
events and the only event emitted is thedisconnect
event; alas, the connector enters a state of waiting with no apparent end. The code of concern can be found in WalletConnect's web3-provider.Notice
Pull Request Type
Issue (if applicable)
Closes #1686
Risk
Testing
Open a terminal for web and another for hdwallet.
Screenshots (if applicable)
@0xdef1cafe copy on pairing modal will need to be updated since a QR code pops up:
On test.walletconnect.org
And lastly on test.walletconnect.org