Identity-Wallet icon indicating copy to clipboard operation
Identity-Wallet copied to clipboard

Swap token feature

Open andregoncalves opened this issue 4 years ago • 18 comments

andregoncalves avatar Mar 26 '20 11:03 andregoncalves

@rhdelima Have you finished testing this ticket?

CortecKYC avatar Apr 07 '20 06:04 CortecKYC

FYI the feature flag is: FEATURE_SWAP_TOKENS=1

andregoncalves avatar Apr 07 '20 10:04 andregoncalves

@andregoncalves Failing this one. Critical error is encountered when clicking Calculate Fees. See recording below. http://recordit.co/92GzdOnV5g

image

build: dev/2020.04.07.12

rhdelima avatar Apr 08 '20 08:04 rhdelima

It seems totle changed one of their API responses. Looking into it.

andregoncalves avatar Apr 08 '20 09:04 andregoncalves

Totle stopped returning the swap fee on the api response. Not sure if this is because Kyber is not live yet, in any case I made a PR to handle this case.

andregoncalves avatar Apr 08 '20 10:04 andregoncalves

@andregoncalves please see initial issues below:

  1. The default Change To value is KEY however after transaction, the exchange was made to another KEY token and NOT SelfKey. Transaction: https://etherscan.io/tx/0xf1c430066738c9f1709a084a0ae813d20793150bdaca9540b99d9e9a52d867cc image

  2. Missing sent to address image

  3. Shows $0.00 USD value for KEY token (not SK) and NaN on Amount image

rhdelima avatar Apr 08 '20 13:04 rhdelima

Investigating it.

But first impression is that it's an issue with totle because we're not live yet on kyber, and totle swap routing goes to the other "KEY"

Because we can only test on mainnet, it's probably a good idea to hold testing until we're live.

andregoncalves avatar Apr 09 '20 09:04 andregoncalves

@andregoncalves You mean, hold testing until we're live on Kyber, right?

CortecKYC avatar Apr 09 '20 09:04 CortecKYC

yes

andregoncalves avatar Apr 09 '20 09:04 andregoncalves

Also other issues: https://gyazo.com/97fcdb575654846cbdc5c6e7d91b2eee vs https://projects.invisionapp.com/d/main#/console/15222689/393424599/preview

  1. Button should be called "Exchange"
  2. Amount input correct placeholder is "Amount to swap*"
  3. Missing the correlated token value under amount input (in the example above, KEY value for that given amount)
  4. Reduce the big space at the end of the modal

oanamangiurea avatar Apr 13 '20 09:04 oanamangiurea

Regarding the other "KEY" token: https://mattermost.kyc-chain.com/kyc-chain/pl/85q3me3by7dfxqbug5pp97esar

andregoncalves avatar Apr 13 '20 11:04 andregoncalves

Trading screen is updatedhttps://projects.invisionapp.com/d/main#/console/15222689/393424599/preview and https://projects.invisionapp.com/d/main#/console/15222689/413340456/preview - in the last one, what feature we were missing, is say I calculated fees for exchanging 1000$, now if I change my mind, and type 1500$ it should go back to 1st screen, with only calculate fees button enabled

oanamangiurea avatar Apr 13 '20 12:04 oanamangiurea

#2170 handles the "other" key token.

andregoncalves avatar Apr 14 '20 10:04 andregoncalves

@andregoncalves Please see some issues below:

  1. CALCULATE FEES not working for SWAPPED tokens. In the recording below, KNC was a swapped token but when I tried to swap it with other token, CALCULATE FEES button is not working https://recordit.co/HOnbjWLEaD

  2. Unable to swap token with enough balance. See recording: http://recordit.co/EE4abTjYlI

  3. Is it possible to add newly swapped token to My Tokens?

  4. Not enough ETH shows Your Address to receive KEY. Replace KEY with ETH image

rhdelima avatar Apr 28 '20 10:04 rhdelima

Work in progress on fixes to 1,2 and 4. Adding new feature for automatically add the swapped token.

andregoncalves avatar Apr 29 '20 10:04 andregoncalves

@andregoncalves What's the status of this ticket? What's left to do?

CortecKYC avatar May 06 '20 09:05 CortecKYC

I'm working on this fix: https://github.com/SelfKeyFoundation/Identity-Wallet/issues/2174#issuecomment-624494844 An an issue reported by ralph on mattermost QA channel.

andregoncalves avatar May 06 '20 09:05 andregoncalves

@andregoncalves I can't do a successful swap due to high transaction fee. Please see issues below:

  1. Transaction fee is too high. Please confirm if this is correct
  2. When using trezor or ledger, we should show modal informing user to confirm swap transaction on the device.
  3. Even if eth not enough modal is shown, Swap completed modal is still displayed http://recordit.co/KJf5eGcRco

rhdelima avatar May 13 '20 06:05 rhdelima