Skip to content

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

Open
pwltr wants to merge 1 commit intomasterfrom
fix/fee-display
Open

fix(ui): show correct duration for fee rate#452
pwltr wants to merge 1 commit intomasterfrom
fix/fee-display

Conversation

@pwltr
Copy link
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

@pwltr
Copy link
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
case bitcoin = "Bitcoin"
case fiat = "Fiat"
case bitcoin
case fiat
Copy link

Choose a reason for hiding this comment

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

Bug: raw value change breaks existing UserDefaults data and migration path

Changing from explicit raw values to implicit ones changes the stored string representation:

// Before: raw values were "Bitcoin" and "Fiat"
case bitcoin = "Bitcoin"
case fiat = "Fiat"

// After: raw values are now "bitcoin" and "fiat" (lowercase)
case bitcoin
case fiat

MigrationsService.swift writes the old capitalized values to UserDefaults:

}
if let unit = settings.unit {
let nativeValue = unit == "BTC" ? "Bitcoin" : "Fiat"
defaults.set(nativeValue, forKey: "primaryDisplay")
}

After this change, @AppStorage("primaryDisplay") var primaryDisplay: PrimaryDisplay will fail to decode "Fiat" (stored by the migration) because PrimaryDisplay(rawValue: "Fiat") now returns nil. The AppStorage property wrapper will silently fall back to the default value .bitcoin, resetting any user who had fiat as their primary display preference.

The migration write path is also permanently broken going forward — it still writes "Bitcoin" / "Fiat", which will never decode correctly with the new enum.

Fix: Either restore the explicit raw values, or update MigrationsService.applyRNSettings to write the new lowercase values ("bitcoin" / "fiat") and add a migration step to convert existing stored values.

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.

1 participant