thunderbiscuit / devkit-wallet

A demo app for the bitcoindevkit on Android.
https://thunderbiscuit.github.io/devkit-wallet/
Apache License 2.0
28 stars 17 forks source link

Feat: Added bump fee for RBF #32

Closed fivetran-tangyetong closed 2 years ago

fivetran-tangyetong commented 2 years ago

A rather big addition for adding simple bump fee feature for RBF enable transactions.

The RBFScreen to send bump fee transactions is a scaled down version of the send screen, but I created it instead of reusing the send screen to prevent the send screen code from getting too bloated.

Since I do not know if it is possible to calculate the transaction size in bytes we cannot find the fee rate in sats/vbyte, hence I left the fees as the total fees when viewing the send bump fees transactions.

The fees shown in the bump fees screen is incorrect though, it showing total fees might imply that you have to change the total fees but it actually is still in sats/vbyte (i.e. it shows 282 (total fees) but in fact the transaction fee rate was 2 sats/vbyte)

WhatsApp Image 2022-07-22 at 4 36 33 PM (1) WhatsApp Image 2022-07-22 at 4 36 33 PM

thunderbiscuit commented 2 years ago

Good stuff! I think there might be edge cases we're not currently accounting for (for example if a transaction is incoming, I'm not sure if the UI is currently maybe allowing you to try and RBF it, but that would of course fail).

But for now this is great! We can deal with the small bugs later.