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

Add WalletConnect functionality (enable, disable, sendTransaction) #129

Merged
merged 7 commits into from
Sep 20, 2022

Conversation

ccali11
Copy link
Contributor

@ccali11 ccali11 commented Sep 19, 2022

@shanejearley - Please see WalletConnect code here. I haven't figured out yet how to test on a test net because I am using Metamask and Trust Wallet on mobile to connect to Casimir. I could do some more investigation, but wouldn't be surprised if test nets on mobile are harder to get set up. Either way, the enable, disable, and sendTransaction functionalities are communicating appropriately and figured I'd submit a PR to build some momentum again here.

Please let me know if this file structure works too; you'll likely have some good thoughts on how to better structure it instead of the way I did (breaking out WalletConnect methods into a utils/ directory). Also, there is an outstanding yet simple TS issue that I could use your opinion on how to resolve quickly. I think you will know exactly what to do with it.

@ccali11
Copy link
Contributor Author

ccali11 commented Sep 20, 2022

@shanejearley - This PR is now ready for approval. If you are able to merge tomorrow morning your time, I will create a new branch off develop and get rolling with Ledger tomorrow morning my time. 👍

apps/web/src/composables/walletConnect.ts Show resolved Hide resolved
apps/web/src/composables/wallet.ts Show resolved Hide resolved
apps/web/src/composables/wallet.ts Show resolved Hide resolved
apps/web/src/composables/walletConnect.ts Show resolved Hide resolved
@shanejearley
Copy link
Contributor

Looks great. I requested a few small changes and then added a few other changes to support the local Hardhat networks on Metamask mobile. Haven't had a chance to write up usage documentation yet, but generally:

  • npm run dev:ethereum in another terminal to run an Ethereum localnet (more info in our README.md here)
  • You'll see values after "Your mnemonic is" and "Your local tunnel is" printed out during the startup followed by a list of account addresses
  • Grab the mnemonic and import it into Metamask (web or mobile) – the initial account will match index 0 of the printed accounts and each newly created account will match the others (derived from the same seed)
  • On web, add the printed RPC URL (defaults to http://127.0.0.1:8545) to a custom network [arbitrarily] named Hardhat with chain ID 1337 and symbol ETH
  • On mobile, add the printed local tunnel URL (should be https://cn-hh-${your-computer-hostname}.loca.lt) with the same chain ID and symbol as above
  • You should now have 32 ETH on each account

@shanejearley
Copy link
Contributor

^Tunnelled RPC URL switched to https://cn-hh-${your-computer-**username**}.loca.lt.

@ccali11 ccali11 merged commit ab3b95d into develop Sep 20, 2022
@ccali11 ccali11 deleted the feature/wallet-connect-init branch September 20, 2022 19:31
@ccali11 ccali11 restored the feature/wallet-connect-init branch September 20, 2022 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants