Agoric / dapp-inter

User application for Agoric Inter Protocol—Vaults, BLD Boost, Liquidations, etc.
2 stars 7 forks source link

chore: suggest connection with chain before connecting with wallet #256

Closed rabi-siddique closed 3 months ago

rabi-siddique commented 3 months ago

Issue: I've encountered an error after installing a new Keplr extension and visiting the dapp-inter URL. When attempting to connect with the wallet, I receive the following error: image

This happens because when I imported or created my wallet, I didn't select the Agoric Chain. Also, there weren't any options available to select any testing chains: A

I noticed that new users may have trouble connecting to the wallet. Typically, we can connect without any problems, but it seems that if we're already connected to the testing chains, it's easier. For example, when I was using the offerup dapp initially and then switched to dapp-inter, connecting my wallet was smooth because I was already connected to the Agoric chain during my work with offerup dapp.

What I've observed is that new users might face difficulty in connecting with the wallet and get the error message I shared above.

So, to fix this, I've utilized the suggestChain utility from @agoric/web-components. Now, whenever we switch between testing networks, it prompts us to connect with the chain first if we're not already connected. I implemented this for the offerup dapp.

NOTE: This issue only occurs in our local environment; the production version works perfectly fine.

github-actions[bot] commented 3 months ago

Network: Commit: 874347f171b59827ea7884afd6b26eaac1f5c8a7 Ref: refs/heads/main IPFS v1 hash: bafybeied3dip4oirjlnzu3svthtbtggtt2cnimeaoukdfettkvo2e533hi CF - DWeb - 4EVERLAND