Closed i5hi closed 7 months ago
Address generation logic seems to be buggy.
Everytime receive is clicked, generateNewAddress is run only when the liquid wallet is selected.
Get New Address button is not working.
The entire address generation logic needs a review.
Network Selection Logic:
We have 3 potential networks that we can receive payments from:
We have 2 potential base wallet types that a payment can be received to:
User can toggle between the 3 potential networks and we must automatically chose the best wallet: A. Bitcoin -> Secure (Standard Bitcoin chain tx) B. Liquid -> Instant (Standard Liquid chain tx) C. Lightning -> Instant (Cheap Swap tx)
Users can override the default choices, but we must issue warnings accordingly.
D. Bitcoin -> Instant (Expensive swap tx) E. Liquid -> Secure (Expensive swap tx) F. Lightning -> Secure (Expensive swap tx)
User cannot swap into Imported, Hardware or Watch-only wallets. Only Secure/Instant.
Currently we dont allow LBTC-BTC Swaps, so if the user choses this option, for now we just show a warning:
LBTC-BTC swaps are not supported yet
First warning screen we can work on would be:
First create the swap. Then calculate what % of the transaction will be spent as fees.
Before displaying the Lightning Invoice, issue the following warning if the amount is less than 0.01 BTC
If the fee is over 3% of the transaction amount, issue the high fee warning as well.
Note that high fee warning can also happen if amount is over 0.01 BTC, in which case we dont show the small utxo warning, only the high fee warning.
The button in both cases should say Continue
not Confirm Send
In summary:
A. Completed
B. Completed - Pending issue related to address generation
C. Pending (LBTC-LN swap) - Issue #246
D. Pending (LBTC-BTC swap) - show currently not supported
E. Pending (LBTC-BTC swap) - show currently not supported
F. Completed (BTC-LN swap) - show warnings above
User can toggle between the 3 potential networks and we must automatically chose the best wallet: A. Bitcoin -> Secure (Standard Bitcoin chain tx) B. Liquid -> Instant (Standard Liquid chain tx) C. Lightning -> Instant (Cheap Swap tx)
Users can override the default choices, but we must issue warnings accordingly.
D. Bitcoin -> Instant (Expensive swap tx) E. Liquid -> Secure (Expensive swap tx) F. Lightning -> Secure (Expensive swap tx)
Receive requires review and some refactoring as some terminology used is confusing:
enum ReceiveWalletType { secure, lightning }
This naming is a bit confusing.
This makes me think which wallet is being recieved into. Although I think it means which address format we want to display.
We should instead use something like:
RecieveAddressFormat
which could be{ bitcoin, liquid, lightning }
We need to also add a case for liquid where the address used is
address.confidential
; we are currently using standard addresses.We should in general review this modules bloc and state and improve the naming conventions so its a bit more clear.