Skip to content

fix(ui): show correct duration for fee rate#452

Merged
pwltr merged 2 commits intomasterfrom
fix/fee-display
Mar 11, 2026
Merged

fix(ui): show correct duration for fee rate#452
pwltr merged 2 commits intomasterfrom
fix/fee-display

Conversation

@pwltr
Copy link
Copy Markdown
Contributor

@pwltr pwltr commented Feb 19, 2026

Description

Mostly a refactor/cleanup but also adds a way to override fee estimates in debug mode (useful for UI work) and aims to show estimated confirmation time when a custom fee is set, instead of "Depends on fee".

  • show correct duration for fee rate where applicable (transaction speed settings, send fee rate, boost sheet)
  • Route fee estimation usage through FeeEstimatesManager; remove direct blocktank.fees() calls
  • Activity: design updates v59 (activity icons, text)
  • force .modern, .bitcoin denomination for custom fee UI
  • add "override fees" dev setting to be able to debug fee estimation UI
  • update localization keys and strings
  • ActivityListViewModel/TransferViewModel: drop unnecesary fee estimation refresh (payOrder takes required satsPerVbyte, estimates cache warmed in ActivityList/ActivityLatest .task)

Screenshot / Video

Simulator.Screen.Recording.-.iPhone.17.-.2026-03-05.at.17.29.39.mov
Simulator.Screen.Recording.-.iPhone.17.-.2026-03-09.at.13.23.20.mov
Simulator.Screen.Recording.-.iPhone.17.-.2026-03-09.at.13.24.48.mov

@pwltr
Copy link
Copy Markdown
Contributor Author

pwltr commented Feb 19, 2026

Drafted to give precedence to other PRs

@pwltr pwltr force-pushed the fix/fee-display branch 2 times, most recently from c3a906d to a794374 Compare February 19, 2026 14:19
@pwltr pwltr self-assigned this Mar 4, 2026
@pwltr pwltr force-pushed the fix/fee-display branch 2 times, most recently from b5e1f67 to 0668e8a Compare March 5, 2026 16:32
@pwltr pwltr marked this pull request as ready for review March 5, 2026 16:32
@pwltr pwltr force-pushed the fix/fee-display branch from 0668e8a to d9f3544 Compare March 5, 2026 21:16
Comment thread Bitkit/ViewModels/CurrencyViewModel.swift Outdated
@pwltr pwltr force-pushed the fix/fee-display branch from d9f3544 to 45f8dd0 Compare March 6, 2026 07:11
Comment thread Bitkit/Views/Wallets/Send/SendFeeRate.swift
Comment thread Bitkit/Views/Wallets/Activity/ActivityRowOnchain.swift
Comment thread Bitkit/Resources/Localization/en.lproj/Localizable.strings
@claude

This comment has been minimized.

@ovitrif
Copy link
Copy Markdown
Collaborator

ovitrif commented Mar 6, 2026

Non-English users will see raw key strings in the fee rate UI and activity list.

Is this how it works?! 🤦🏻 In Android it simply shows the non-translated text using the default locale, ie. English copy.
This is platform-level thing, just curious.

@pwltr
Copy link
Copy Markdown
Contributor Author

pwltr commented Mar 6, 2026

Non-English users will see raw key strings in the fee rate UI and activity list.

No it's making shit up, it falls back to English.

@pwltr
Copy link
Copy Markdown
Contributor Author

pwltr commented Mar 9, 2026

One open issue here is that after a boost the replaced activity item does not have the RBF'd fee rate, resulting in the UI showing an incorrect duration ("+2 hours" instead of "+10 minutes"). As can be seen in the last screen capture.

@ben-kaufman Is this something we can fix?

@ben-kaufman
Copy link
Copy Markdown
Contributor

@pwltr
Copy link
Copy Markdown
Contributor Author

pwltr commented Mar 9, 2026

@pwltr this should fix it https://github.com/synonymdev/bitkit-ios/pull/484/changes

Could've sworn I tried that, thanks!

…ion (#484)

After boosting an outgoing transaction via RBF, the original activity item
was still displaying the old fee rate, causing the confirmation time estimate
to show "+2 hours" instead of "+10 minutes". Update the feeRate on the
original activity when marking it as boosted so the correct duration is
shown until the replacement transaction is detected on-chain.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

Checked for bugs and CLAUDE.md compliance. Found 4 issues.

Comment thread Bitkit/Views/Wallets/Send/SendFeeRate.swift
Comment thread Bitkit/Models/TransactionSpeed.swift
Comment thread Bitkit/Managers/FeeEstimatesManager.swift
Comment thread Bitkit/Views/Wallets/Send/SendConfirmationView.swift
@pwltr pwltr added this to the 2.2.0 milestone Mar 9, 2026
@jvsena42

This comment was marked as outdated.

@jvsena42

This comment was marked as resolved.

@pwltr
Copy link
Copy Markdown
Contributor Author

pwltr commented Mar 11, 2026

Simulator.Screen.Recording.-.iPhone.16.-.2026-03-11.at.07.18.05.mp4
Confirm in is not updating, I suppose it is because it is in regtest

For regtest use the "Override Fees" settings in dev settings

Copy link
Copy Markdown
Member

@jvsena42 jvsena42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fee Estimation & Display

  • Transaction Speed Settings — Go to Settings > General > Transaction Speed. Verify each option (Fast, Normal, Slow, Custom) shows the correct longTitle and longRange (e.g. "Fast (more expensive)" / "± 10-20 minutes")
  • Custom speed with fee estimates — Set a custom fee rate in Transaction Speed Settings. Verify the row shows a tier-based duration (e.g. "± 10-20 minutes") instead of "Depends on the fee"
  • Custom speed input — In Custom Speed view, verify the fee amount is always shown in Bitcoin/modern denomination regardless of user currency preference (forceUnit: .bitcoin, forceDisplayUnit: .modern)
  • Custom speed input color — Verify fee amount text is secondary color when rate is 0, primary when > 0

Send Flow

  • Send confirmation (on-chain) — Initiate an on-chain send. Verify the fee speed label shows .title (e.g. "Fast") and the confirmation time shows the tier-based range (e.g. "±10-20 minutes") based on the actual fee rate, not the static speed description - ⚠️ The "confirm in" was 10 minutes to all transactions but probably because of regtest
  • Send fee rate picker — Tap to change fee rate on send. Verify all 4 options (Fast, Normal, Slow, Custom) display correctly with amounts
  • Custom fee in send flow — Select custom fee. Verify the rangeOverride shows a tier-based range instead of "Depends on the fee"

Activity List (Home Screen)

  • Pending on-chain sent tx — Verify unconfirmed sent on-chain transactions show an hourglass icon (orange) in the row
  • Confirmed on-chain tx — Verify confirmed transactions show the normal arrow icon
  • Pending transfer row — Verify a pending transfer shows "Transferring" as status and description like "From Savings (±10m)"
  • Confirmed transfer row — Verify a confirmed transfer shows "Transfer" as status
  • Boosted tx row — Verify a boosted unconfirmed tx shows "Boosting" as status text and the clock-clockwise icon (yellow)
  • Lightning payment rows — Verify sent/received/pending/failed Lightning payments show correct status text and icons
  • Fee estimate duration in rows — Verify unconfirmed on-chain txs show "Confirms in ±10m" (shortDescription) based on the actual fee rate

Activity Detail View

  • Unconfirmed on-chain detail — Status section shows "Confirming" with hourglass icon
  • Boosted tx detail — Status shows "Boosting" with timer-alt icon (yellow)
  • Transfer in progress detail — Status shows "In Transfer (±10m)" with duration from fee rate
  • Confirmed tx detail — Status shows "Confirmed" with checkmark

Boost Sheet

  • Open boost sheet — Tap boost on an unconfirmed tx. Verify the sheet opens with recommended fee
  • Boost fee display — Verify fee shows "₿ X/vbyte" on one line, and MoneyText amount + tier description (e.g. "±10m") on the second line
  • Edit fee — Tap pencil icon to edit fee. Verify +/- buttons work and fee updates live
  • "Use Suggested Fee" button — Verify it resets to the suggested fee (secondary button variant)
  • Swipe to boost — Complete a boost. Verify the activity updates with the new fee rate and shows correct duration estimate
  • Post-boost fee rate — After boosting via RBF, verify the activity row shows the new (higher) fee rate's duration, not the original - ❌ After boostin, the expected time increase from 10min to 20 min

Dev Settings (Regtest only)

  • Override Fees toggle visible — Go to Dev Settings on regtest. Verify "Override Fees" toggle appears
  • Override Fees ON — Enable the toggle. Verify all fee displays use hardcoded rates (fast: 10, mid: 7, slow: 3) — useful for UI debugging
  • Override Fees OFF — Disable the toggle. Verify fees come from the backend again

General Settings Display

  • Settings > General — Verify the Transaction Speed row shows .title (e.g. "Fast") not the old displayTitle

@jvsena42
Copy link
Copy Markdown
Member

jvsena42 commented Mar 11, 2026

Boost confirmation bug, could be because of regtest (override fees disabled)

Simulator.Screen.Recording.-.iPhone.16.-.2026-03-11.at.07.53.48.mp4

@jvsena42
Copy link
Copy Markdown
Member

jvsena42 commented Mar 11, 2026

Boost confirmation bug, could be because of regtest (override fees disabled)

Simulator.Screen.Recording.-.iPhone.16.-.2026-03-11.at.07.53.48.mp4

Worked after enabling override fees

Simulator.Screen.Recording.-.iPhone.16.-.2026-03-11.at.08.04.40.mp4

Copy link
Copy Markdown
Member

@jvsena42 jvsena42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose the found issues are related to regtest. Everything worked after enabling override fees

@pwltr
Copy link
Copy Markdown
Contributor Author

pwltr commented Mar 11, 2026

I suppose the found issues are related to regtest. Everything worked after enabling override fees

No this seems to be valid. My guess is on .onchainTransactionReplaced the new activity item has the correct total fee but incorrect fee rate.

Simulator.Screen.Recording.-.iPhone.17.-.2026-03-11.at.13.06.19.mov

@pwltr
Copy link
Copy Markdown
Contributor Author

pwltr commented Mar 11, 2026

Created a follow-up issue in bitkit-core. @ben-kaufman Please correct me if that is the wrong assessment, or does it belong in ldk-node?

@pwltr pwltr enabled auto-merge (squash) March 11, 2026 12:17
@pwltr pwltr merged commit 2f41845 into master Mar 11, 2026
18 checks passed
@pwltr pwltr deleted the fix/fee-display branch March 11, 2026 12:17
@ben-kaufman
Copy link
Copy Markdown
Contributor

No neither, activities are created by the native apps and fee rate should come from them.

@pwltr
Copy link
Copy Markdown
Contributor Author

pwltr commented Mar 11, 2026

Created a follow-up issue in bitkit-core

Follow up issue here: #485

pwltr added a commit that referenced this pull request Mar 24, 2026
* fix(ui): show correct duration for fee rate

* fix(boost): update fee rate on RBF activity so UI shows correct duration (#484)

After boosting an outgoing transaction via RBF, the original activity item
was still displaying the old fee rate, causing the confirmation time estimate
to show "+2 hours" instead of "+10 minutes". Update the feeRate on the
original activity when marking it as boosted so the correct duration is
shown until the replacement transaction is detected on-chain.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: benk10 <ben.kaufman10@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants