Skip to content

Conversation

@jvsena42
Copy link
Member

@jvsena42 jvsena42 commented Jun 18, 2025

This PR moves the business logic and states from the CurrencyViewModel to a repository so they can be shared across other ViewModels

  • Create the CurrencyRepo
  • Refactor the CurrencyViewModel to get the repository methods and state
  • Cache data

Related to #195
Necessary to #196

@jvsena42 jvsena42 self-assigned this Jun 18, 2025
@jvsena42 jvsena42 marked this pull request as ready for review June 18, 2025 17:15
@jvsena42 jvsena42 requested a review from ovitrif June 18, 2025 17:15
@jvsena42 jvsena42 enabled auto-merge June 18, 2025 17:15
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.

Nice!

Added a comment about the duplicate caching, which is ok to just fix with a deprecation annotation on the service method loadCachedRates(), which is used in multiple places.

Just wanting to make sure we don't forget about this, if it's a must to merge asap so progress on the high-balance-warning is unblocked.

@jvsena42 jvsena42 merged commit 93e872b into master Jun 18, 2025
1 check passed
@jvsena42 jvsena42 deleted the refactor/currency-repository branch June 18, 2025 19:15
ovitrif pushed a commit that referenced this pull request Nov 5, 2025
… details

This PR adds boosted txids tracking and displays parent transaction IDs in the activity details, matching iOS PR #199.

## Changes

- Added `boostTxIds: List<String>` field to `PendingBoostActivity` to store parent transaction IDs
- **CPFP**: Append child transaction ID to parent's `boostTxIds` when boosting
- **RBF**: Track parent chain (existing `boostTxIds` + current txId) in `PendingBoostActivity`. Store parent txIds when creating replacement, retrieve and apply when replacement syncs
- **UI**: Display boosted transaction IDs in `ActivityDetailScreen` with labels "BOOSTED TRANSACTION {num} (CPFP)" or "BOOSTED TRANSACTION {num} (RBF)" based on transaction direction

### Implementation Details

1. **PendingBoostActivity DTO**: Added `boostTxIds` field to track parent transaction IDs for RBF
2. **BoostTransactionViewModel**:
   - Updated `cachePendingBoostActivity()` to track parent chain for RBF (existing boostTxIds + current txId)
   - Updated `handleCPFPUpdate()` to append child txId to parent's boostTxIds
3. **ActivityRepo**: Updated `boostPendingActivities()` to apply tracked boostTxIds when processing pending boosts
4. **ActivityDetailScreen**: Added UI section to display boosted transaction IDs with appropriate labels

This matches the behavior implemented in bitkit-ios PR #199.
@claude claude bot mentioned this pull request Nov 17, 2025
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.

3 participants