Skip to content

Conversation

@jvsena42
Copy link
Member

@jvsena42 jvsena42 commented Sep 15, 2025

Closes #374

Description

This PR fixes the RBF error due to a too low recommended fee rate and also improve the latest activities fetching

Preview

cpfp-suggested.webm
rbf-suggested.webm

QA Notes

Tested:

  • RBF > Recommended fee > Boost with success
  • CPFP > Recommended fee > Boost with success
  • Max amount warning
  • Min amount warning

@jvsena42 jvsena42 self-assigned this Sep 15, 2025
@jvsena42 jvsena42 changed the title fix: min fee cal on Boost fix: min fee calculation on RBF Sep 15, 2025
@jvsena42 jvsena42 changed the title fix: min fee calculation on RBF Minimal fee calculation on RBF Sep 15, 2025
@jvsena42 jvsena42 changed the title Minimal fee calculation on RBF Minimal fee checks on RBF Sep 15, 2025
@jvsena42 jvsena42 marked this pull request as ready for review September 15, 2025 13:39
@jvsena42 jvsena42 requested a review from Copilot September 15, 2025 13:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses RBF (Replace-By-Fee) errors caused by low recommended fee rates and improves the latest activities fetching mechanism. The changes implement proper minimum fee rate checks for RBF transactions and make the activities refresh function public for better state management.

  • Implements dynamic minimum fee rate calculation for RBF transactions (original fee rate + 2 sat/vbyte)
  • Refactors activity list syncing to use explicit fetch calls instead of internal sync methods
  • Adds automatic max fee warning display when fee limits are reached

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
BoostTransactionViewModel.kt Core fee calculation logic with dynamic minimum fee rates for RBF and improved fee validation
ActivityListViewModel.kt Refactored sync method to public fetchLatestActivities for better external access
BoostTransactionSheet.kt Fixed LaunchedEffect dependency to prevent unnecessary re-initialization
ActivityDetailScreen.kt Added activity refresh call after successful boost transaction
HomeScreen.kt Enhanced pull-to-refresh to include latest activities fetch
LightningRepo.kt Increased sync timeout from 15 to 20 seconds

@jvsena42
Copy link
Member Author

couldn't test Min amount warning because the min fee rate is reached before the min fee amount

@jvsena42 jvsena42 marked this pull request as draft September 15, 2025 16:24
@jvsena42
Copy link
Member Author

Drafted to implement Copilot suggestions

@jvsena42 jvsena42 marked this pull request as ready for review September 15, 2025 16:39
@jvsena42 jvsena42 requested a review from ovitrif September 15, 2025 16:41
Copy link
Collaborator

@ovitrif ovitrif left a comment

Choose a reason for hiding this comment

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

LGTM and worked like a charm in my 1 RBF test 🎉

@ovitrif
Copy link
Collaborator

ovitrif commented Sep 15, 2025

not sure why the e2e tests are failing 🤷🏻

EDIT: nvm succeeded now except the boost test

retriggering ♻️

@jvsena42 jvsena42 merged commit f669d54 into master Sep 15, 2025
11 of 15 checks passed
@jvsena42 jvsena42 deleted the fix/suggested-fee-calc-boost branch September 15, 2025 17:55
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.

Boost intermittently fails on "Use suggested fee"

3 participants