Closed onyb closed 3 years ago
Verification passed on
Brave | 1.26.67 Chromium: 91.0.4472.114 (Official Build) (x86_64) |
---|---|
Revision | 4bb19460e8d88c3446b360b0df8fd991fee49c0b-refs/branch-heads/4472@{#1496} |
OS | macOS Version 10.15.7 (Build 19H114) |
Component | 1.0.31 Dev |
Verification passed on
Brave | 1.27.87 Chromium: 91.0.4472.124 (Official Build) beta (64-bit) |
---|---|
Revision | 7345a6d1bfcaff81162a957e9b7d52649fe2ac38-refs/branch-heads/4472_114@{#6} |
OS | Windows 10 OS Version 2009 (Build 19043.1052) |
Component | 1.0.32 Dev |
Verification passed on
Brave | 1.28.37 Chromium: 91.0.4472.124 (Official Build) nightly (64-bit) |
---|---|
Revision | 7345a6d1bfcaff81162a957e9b7d52649fe2ac38-refs/branch-heads/4472_114@{#6} |
OS | Linux |
Component | 1.0.32 Dev |
Improve layout of the Swap page
Status: ✅ (https://github.com/brave/ethereum-remote-client/pull/237)
Allow asset dropdowns to have an unselected state
Add a state to display a "Select asset" text when:
Status: ✅ (https://github.com/brave/ethereum-remote-client/pull/240)
Swap amount validation
The amount entered must be validated against the available token balance AND the available ETH for paying gas.
Status: ✅ (https://github.com/brave/ethereum-remote-client/pull/241)
Gas computation
The current gas estimates are completely off and need to be fixed. Here is a list of related TODOs.
Status: ✅ (https://github.com/brave/ethereum-remote-client/pull/240 and https://github.com/brave/ethereum-remote-client/pull/241)
Max amount button
Add a button near the From asset field, allowing users to set the maximum available balance in the amount field. The logic for this already exists (from the Send workflow), but there is some cleanup and integration work to do.
Status: ✅ (https://github.com/brave/ethereum-remote-client/pull/241)
Add more tokens as Swap pairs
The allowed asset pairs are currently hardcoded. We need to obtain the list of tokens supported by 0x API, and add it to our Swap implementation.
Status: ✅ (https://github.com/brave/ethereum-remote-client/pull/240)
Quote refresh
Periodically obtain a fresh quote (say every 30 seconds) and update the Redux state. Also needs to be done whenever there's a change in asset pairs and the amount. The queries to the API must be debounced.
Also, implement a countdown in the UI.
Status: ✅ (https://github.com/brave/ethereum-remote-client/pull/240)
Search
Users should be able to search for tokens. Fuse.js can be used to implement fuzzy search. Most of the work is on the UI side.
Status: TODO
Fix component unit tests
Status: ⏭️ ONGOING
Code cleanups
Several components have leftover code from the Send boilerplate. Additionally, certain files could benefit from higher-order components to avoid duplication of code.
Status: ⏭️ (https://github.com/brave/ethereum-remote-client/pull/242)
End-to-end swap
We need to carefully audit that the generated raw transaction is actually valid.
Nice to have: deploy 0x contracts and Swap API locally and perform an end-to-end swap transaction.
Status: ⏭️ (https://github.com/brave/ethereum-remote-client/pull/242)
~Approval screen (nice to have)~
~This is not necessary to roll out the first version of the Swap feature, but an additional screen for "Sign" would be nice to have. Today, the user must approve the swap from the transaction queue, which is not ideal.~
Update: User is now automatically redirected to a view for approving the transaction. Status: ⏭️ (https://github.com/brave/ethereum-remote-client/pull/242)
Specify spending allowance
Allow user to approve token spending allowance. Requires a dedicated screen.
Status: ⏭️ (https://github.com/brave/ethereum-remote-client/pull/242)