Skip to content

fix: preserve boosted activity fee rates - #879

Draft
pwltr wants to merge 3 commits into
masterfrom
codex/fix-rbf-activity-fee-rate
Draft

pwltr wants to merge 3 commits into
masterfrom
codex/fix-rbf-activity-fee-rate

Conversation

@pwltr

@pwltr pwltr commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #485

This PR records outgoing RBF fee boosts through shared core APIs and preserves the recorded rate during activity sync, so the replacement shows the correct confirmation estimate.

Depends on bitkit-core #166. Companion: Android #1429.

Draft dependency gate: the published 0.5.18 SDK does not expose the two new APIs. Before this PR is ready, merge and publish the core fix, update the dependency to that release, and rerun integration checks against the released SDK. The local simulator SDK package and project override are deliberately excluded from the PR. Current core master includes SDK changes beyond 0.5.18; those must be accounted for when updating the dependency.

Description

  • Records the replacement txid and selected fee rate atomically in core after a successful outgoing RBF boost, including when the replacement arrives before the boost call returns.
  • Uses core's fee-preserving snapshot upsert for onchain payment sync and replacement/reorg/eviction events so stale events cannot restore the 1 sat/vB fallback.
  • Keeps actual replacement fees and wallet-specific activity metadata intact, and adds isolated regression coverage and a reproducible simulator journey.
  • Shares the RBF journey with Android, documenting the backend preconditions and local SDK requirement for both platforms.

Out of Scope

Design

N/A — no UI changes.

Preview

BeforeAfter
Simulator.Screen.Recording.-.iPhone.17.-.2026-10-06.at.13.24.16.mov
Simulator.Screen.Recording.-.iPhone.17.-.2026-10-06.at.13.37.15.mov

QA Notes

Journeys

  • new rbf-replacement-fee-rate.xml — verifies that a low-fee outgoing transaction's RBF replacement shows the boosted confirmation estimate, retains its real total fee after sync/reopening, and confirms normally.

The author reproduced the issue and verified the fix in the simulator using the local SDK built on a 0.5.18-compatible core snapshot. Additional iOS checks verified contact/tag carryover after boosting and reopening, and ordinary send/receive behavior. The Android RBF fix has also been manually verified using the corresponding local core SDK. These checks do not claim the full shared journey or all Android regression paths were executed; the journey remains listed for reviewer execution against the final released SDK.

Manual Tests

N/A

Automated Checks

  • added RbfActivityFeeRateTests.swift — eight regressions cover both replacement arrival orders, stale snapshots, repeated boosts, failed boosts, metadata preservation, removed originals, and hardware-wallet isolation.
  • ran the focused simulator suites against the updated local core SDK — all 32 tests passed, including RbfActivityFeeRateTests.swift, ActivityListTest.swift, ActivityHardwareTests.swift, and TransferServiceActivityTests.swift.
  • ran a Debug build and launched it on iPhone 17 with the local simulator SDK — the app opened normally with the existing wallet intact.

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.

[Bug]: RBF'd activity has incorrect fee rate

1 participant