feat(fees): working network fee selection for sell and pay - #2536
Draft
BullishNode wants to merge 1 commit into
Draft
feat(fees): working network fee selection for sell and pay#2536BullishNode wants to merge 1 commit into
BullishNode wants to merge 1 commit into
Conversation
The Network fee priority row on the sell and pay confirmation screens was a debugPrint stub and every transaction paid the fastest rate. - SellBloc and PayBloc implement the shared fee modal's view-state and actions ports, following SendCubit's semantics: preset selection, custom sat/vB or absolute fees with arm/disarm/finalize, epoch-guarded previews, and a relay-floor gate on finalize. - The row opens the shared FeeOptionsModal and shows the committed selection; the summary fee reprices from a real PSBT built at the selected rate on every change. - Confirm prepares, signs and broadcasts at the committed selection. Unlike send and swap, the preview PSBT is display-only: sell and pay rebuild at broadcast time because a price-lock refresh can move the order's payin amount. The built fee is re-asserted against the relay floor before signing. - Fee editing locks while a confirmation is in flight or the payin is broadcast; handlers re-read live state so queued events are dropped, and every post-await emit merges into live state - a recalculation or preview landing after the flow moved on emits nothing instead of resurrecting a pre-broadcast state. - Previews price against the order's real payin address. Closes #2521
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem (#2521)
The "Network fee priority" row on sell and pay confirmation screens was a
debugPrintstub with a// TODO; every transaction paid the fastest rate end-to-end — the bloc ignored the fee selection its confirm event already declared.Changes
SellBloc/PayBlocimplement the shared fee modal'sFeeModalViewState/FeeModalActionsports, followingSendCubitsemantics: presets, custom sat/vB or absolute fees with arm/disarm/finalize, epoch-guarded previews, relay-floor gateFeeOptionsModaland displays the committed selection; the summary fee reprices from a real PSBT built at the selected rateValidation
Sell suite 13/13, pay suite 8/8 (selected-preset-reaches-prepare, custom-fee path, below-floor rollback, events-inert-once-latched, preset previews, post-success recalc emits nothing — the money-path tests capture every
networkFeehanded to prepare and assert it equals the picked tier); analyze clean; reviewed with a verification pass (1 blocker + 2 should-fixes applied).Closes #2521