DFXswiss / btc-wallet

DFX Bitcoin Light Wallet for iOS & Android
https://dfx.swiss
MIT License
6 stars 3 forks source link

Show a large warning if RBF is not available. #64

Closed TaprootFreak closed 5 months ago

TaprootFreak commented 6 months ago

Some DFX customers use the BTC Taro wallet with a legacy or SegWit wallet. This can be recognised by the fact that the address begins with 1 or 3. The problem is that no RBF is offered with these wallets. So if a user uses the BTC Taro wallet with a 3 address and makes a transaction, the fee may be too low and then it is not possible to accelerate the transaction using RBF. This leads to unhappy customers. We should actively warn all users who use a wallet without RBF function.

Bildschirmfoto 2024-05-17 um 22 31 10

Message: Warning! You are using an outdated wallet without RBF function. Click here for more information.

Link: https://docs.dfx.swiss/en/faq.html#why-should-i-use-a-wallet-with-rfb-support

When should this message be displayed?

All wallets that do not support RBF should display a warning. I am not 100% sure, but I think only wallets with the format "HD SegWit (BIP84 Bech32 Native)" support RBF.

"HD SegWit (BIP84 Bech32 Native)" is the default wallet when creating a new wallet. But some users import a seed and then the BTC Taro wallet may work with a different wallet format such as "SegWit (P2SH)".

so I think we should display the wallet notice for every wallet that is not "HD SegWit (BIP84 Bech32 Native)".

Here is an example of a transaction from a non-RBF wallet (SegWit) and a transaction from an RBF wallet (Bech32 Native):

Bildschirmfoto 2024-05-17 um 22 39 30
Danswar commented 5 months ago

Some resolutions are affected by this warning message, the last item in the list of assets gets under the buttons for receive/scan/send as shown here:

Screenshot 2024-05-20 at 8 43 53 PM

Another option could be displaying the message on the Send screen:

Screenshot 2024-05-20 at 8 42 28 PM

Danswar commented 5 months ago

I am not 100% sure, but I think only wallets with the format "HD SegWit (BIP84 Bech32 Native)" support RBF.

This is true in the context of our wallet, only the default format support RBF, but other formats do support RBF as this feature is at protocol level, in theory we could add support for that in future, but maybe it doesn't worth it.

As an example here are some transactions I created using sparrow from some legacy and segwit wallets of mine, look that they are labeled as RBF compatible by the explorer: https://mempool.space/tx/155bc65646a88118a9932708982f2f6f3e492b130d8ba92f25e2d0e8a8bfa54f https://mempool.space/tx/e83c0e41a1062ddb091820e8e2bd74af060961af7800deafb036e2ff8be3ec61 https://mempool.space/tx/aff76b5d1537bb3d41f42f85af7c8eb6c098ba3265b8862fb6c714b77702076c https://mempool.space/tx/3d075d34625c680800369879cf5928e2ebf6ac7d770baad3408643c7fc012f66

@TaprootFreak

TaprootFreak commented 5 months ago

Yes, that is correct.

We should either install the warning or the RFB function. Whichever is easier.

Danswar commented 5 months ago

@TaprootFreak

I added this warning on #70. There are still some devices that may lose sight of the last item on the list of assets (CHF Taro protocol) although they should be few.

It seems to me that it is feasible to add support for RBF in the most popular legacy wallets, if you think it is a good idea to add it, I would like to propose you to do some PR to Bluewallet, so we can get review for those low level changes that are a bit sensitive.

The value of this would be increasing our level of functionality and also removing the warning.

TaprootFreak commented 5 months ago

For us, adding RBF to non bech32 addresses is not a priority

It would be great, but not something we are actively looking for