T3322
A new Swap component powered by Sideshift.
**Design considerations for further discussion:**
- The way this sideshift button is embedded is via setting the FROM and TO sides of the swap in the React app’s index.html header, which makes it somewhat challenging to be changing on the fly (is this even possible?). Without this it’ll just be a static directional swap e.g. USDT -> XEC.
- Do we need to add event listeners for when a shift (swap) has been settled with at least one deposit, an order is made or upon other deposit events?
- Do we need to increase implementation complexity even further by trying to automatically transfer a completed USDT -> XEC swap into the active Cashtab wallet? This might make Cashtab custodial for a short portion of the end to end swap transaction. And similar to the swap direction, the settlement address is also defined in index.html’s header tag, which presents a similar challenge in changing on the fly.
- The sideshift widget currently hovers above Cashtab, which is probably ok since Cashtab’s UI real estate is very limited. It is closed via the X button on the top right.
- The sideshift widget’s theme is at odds with Cashtab’s.