web icon indicating copy to clipboard operation
web copied to clipboard

Rates persisted across a wallet connect and other user actions

Open 0xean opened this issue 1 year ago • 1 comments

When the swapper is exposed externally without a wallet connected and a user receives rates and then decides to connect a wallet, we want to ensure there isn't a full refresh required and they dont get kicked back into the flow.

Uniswap does a nice job of this ( https://app.uniswap.org/swap ) as an example.

AC

  • swapper state persists upon wallet connection
  • clicking back button from confirm screen returns to previous state vs full refresh
  • moving from "mini swapper" on the markets page to the "full swapper" persists state

0xean avatar Oct 21 '24 22:10 0xean

to fix your trouble check this solution click maybe this will solve your problem.

Olowojaye avatar Oct 26 '24 21:10 Olowojaye

Spoke with @gomesalexandre and I'll focus on reviewing https://github.com/shapeshift/web/pull/8079 and wait until that goes in before starting this guy.

0xApotheosis avatar Nov 18 '24 07:11 0xApotheosis

Note to self:

  • Some wallets do have receiveAddress or similar. not having those (since we can't really and definitely shouldn't try and mutate existing quotes for safety reasons) means some things may not be working, or not work so well e.g network estimations
  • We will want to ensure if the user selected a cross-account quote, we do invalidate their quote choice
  • Receive addresss is a similar issue, at it is effectively cross-account

gomesalexandre avatar Nov 29 '24 12:11 gomesalexandre

Added complexity in this make it potentially not feasible to get the finalized UX that we want.

@gomesalexandre to sync with @twblack88 to determine an alternative solution that might be acceptable for the time being

0xean avatar Dec 04 '24 22:12 0xean

@twblack88 ping ^^

gomesalexandre avatar Jan 07 '25 21:01 gomesalexandre

Closing as previously discussed with @twblack88

FBL — 08/01/2025, 18:01 We can close since there is no solution right?

gomesalexandre avatar Jan 13 '25 11:01 gomesalexandre