Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Support terra station wallet #179

Merged
merged 10 commits into from
Apr 6, 2022
Merged

Conversation

npty
Copy link
Member

@npty npty commented Mar 9, 2022

Description

Closes #177

This PR adds an option for users to choose their preferred wallet, either Terra Station wallet or Keplr wallet when the source chain is Terra.

Condition to show each connect wallet button:

  • source chain is terra -> show both Connect Keplr and Connect Terra
  • source chain is evm -> show Connect Metamask
  • otherwise -> show Connect Keplr

Also, introduce 2 dependencies as following:

  • @terra-money/wallet-provider - to connect with Terra wallet extension
  • @terra-money/terra.js - to construct MsgTransfer object for ibc transfer.

Demo

ibc-transfer-terra.mov

@npty npty requested a review from canhtrinh March 9, 2022 08:34
@npty npty force-pushed the feat/add-terra-station-support branch from 7c1dbfc to ee471ad Compare March 9, 2022 08:37
@npty npty requested review from vladwulf and sergeynog March 9, 2022 08:40
@canhtrinh
Copy link
Collaborator

canhtrinh commented Mar 9, 2022

few small nits in this PR. i'll try to work on these and merge today:

  • comment to add TS logo and remove text from top right
  • on step 2, when I click "Connect Terra", I actually get an error that fills the whole screen (screenshot attached)
  • When transferring to Terra, the first screen doesn't show the option to connect to TS. Still only has Keplr wallet.

UPDATE 1: i just noticed that it asks to connect to TS once the app launches. since the other wallets only connect on demand, we should also disable this requirement and only connect to TS when user selects to do so. not sure if that's possible though with this library, but i'll check too.

UPDATE 2: Also, something is off here where my balances isn't getting recongized (screenshot 2):

image

image

@npty
Copy link
Member Author

npty commented Mar 11, 2022

@canhtrinh Updates

  • Fix terra address error
  • Replace bloat text on the header with a simple button "Add terra chain [keplr logo]"
  • For me, terra station doesn't popup up when the page loaded anymore. I'm not sure why because I didn't change anything related to that.

Note: If you connect the terra station to the site for the first time, you have to click "Connect wallet twice". The first click is to approve our site to terra station and the second click is to read wallet address, balance, etc.

@canhtrinh
Copy link
Collaborator

did some testing on this and seems like we still have issues.

  1. the popup still does show up for me. to reproduce, try deleting the Terra Station wallet and then reinstalling it.
  2. even after you install it, the three popups you mention are not a great user experience. it's even weird that one of the popups is to connect wallet to bridge.terra.money... even though that's not open.
  3. the wallet balance that shows in the app is for the wrong network. when i logged into testnet, i saw my mainnet balance. this should be addressed so that people don't send the wrong funds for hte wrong network accidentally

@canhtrinh canhtrinh merged commit 2277332 into develop Apr 6, 2022
@canhtrinh canhtrinh deleted the feat/add-terra-station-support branch April 6, 2022 18:34
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.

add Terra Station support
2 participants