-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UX/UI] Add CPFP #3395
[UX/UI] Add CPFP #3395
Conversation
@NicolasDorier Getting this exception thrown:
This happens because in UI I selected already confirmed transaction and tried to bump it. Not sure if we can address this in a UI or you maybe need to throw a proper error : Also do you think we can use specific label to label a transction that's bumped? Maybe that can be nice addition? |
@pavlenex fixed the exception |
Ping @dstrukt what icon should I put for that? |
487187d
to
c9b773a
Compare
This PR also refactor the signing process to be able to redirect to the right page after the transaction has been broadcasted. |
f36c109
to
6bb1644
Compare
Nice, looking forward to incorporate this into #3441. |
627f3c0
to
ca6a338
Compare
As echoed in MM, support this decision. |
Address: #2509
This add basic CPFP to the invoice list and the wallet transaction list.
In the invoice's list, we assume CPFP is used on Bitcoin. Thus, CPFP in the invoice list doesn't support altcoins.
To use it, select transactions/invoices you want to bump, then click on
Bump fee
. This will redirect you to the signing flow.I plan to include an UI intermediary step later before the signing flow.
CPFP will create a new transaction spending the output of all selected invoices/transactions.
The fee rate horizon of this new transaction is currently hardcoded: We assume the user wants this transaction confirmed in the next block.
On top of the CPFP fee, we add fee to all the bumped transactions.
To know how much to bump, we assume the bumped transactions have a fee rate equal to what is needed to be included 20 blocks, and add the difference to what is needed to be included in the next block.
NBXplorer doesn't have the fee rate of transactions, this is why we assume rather than taking the actual fee rate of the bumped transactions.
For example:
Now imagine we have 2 transaction
Now we CPFP both of them with tx C.
The fee of tx C will be (size 160 bytes):
160 * 12 = 1920
(150 + 124) * 12 - (150 + 124) * 2 = 2740
Total = 1920 + 2740 = 4660
I believe we can improve this in the future. Since the transactions are still unconfirmed, it should be possible to get the real fee rate of A and B (5 and 10 sat/b), rather than assuming they both paid
2 sat/b
.Screenshot: