Skip to content

fix(xrp listoperations): 🐛 add fees operation for transactions th…#14881

Merged
qperrot merged 1 commit intodevelopfrom
fix/xrp-listoperation-fees
Feb 27, 2026
Merged

fix(xrp listoperations): 🐛 add fees operation for transactions th…#14881
qperrot merged 1 commit intodevelopfrom
fix/xrp-listoperation-fees

Conversation

@qperrot
Copy link
Contributor

@qperrot qperrot commented Feb 27, 2026

…at are not payment

✅ Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • ...

📝 Description

Transaction is a token transaction, it’s expected we don’t get the full data if we don’t support tokens. However, the account has paid fees in this transaction so we added an operation of type FEES.

Screen.Recording.2026-02-27.at.12.35.30.mov

❓ Context


🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

@live-github-bot live-github-bot bot added coin-modules-api Has changes in the coin-framework/coin-modules APIs coin-modules labels Feb 27, 2026
@qperrot qperrot marked this pull request as ready for review February 27, 2026 12:30
@qperrot qperrot requested a review from a team as a code owner February 27, 2026 12:30
Copilot AI review requested due to automatic review settings February 27, 2026 12:30
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 updates the XRP listOperations logic to surface network fees for non-Payment transactions (e.g., unsupported token-related activity) by emitting FEES operations, and adds unit/integration coverage for the new behavior.

Changes:

  • Extend XRP operation listing to include FEES operations for non-Payment transactions initiated by the queried address.
  • Add unit tests validating inclusion/exclusion of FEES ops and failed status handling.
  • Add API-level and mainnet integration tests plus a changeset for the package release.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
libs/coin-modules/coin-xrp/src/logic/listOperations.ts Adds non-Payment transaction handling and converts them into FEES operations.
libs/coin-modules/coin-xrp/src/logic/listOperations.test.ts Adds unit tests for FEES operation generation and filtering.
libs/coin-modules/coin-xrp/src/api/index.test.ts Adds API wrapper tests ensuring FEES ops are returned/filtered correctly.
libs/coin-modules/coin-xrp/src/api/index.integ.test.ts Adds a mainnet integration assertion for a FEES operation.
.changeset/flat-eagles-applaud.md Declares a release bump for @ledgerhq/coin-xrp tied to the behavior change.

senders: [Account],
recipients: [],
details: {
xrpTxType: TransactionType,
Copy link
Contributor

Choose a reason for hiding this comment

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

question: do you think we can use ledgerOpType and give a type supported by the generic adapter (so it is ready if we support XRP token in Ledger Wallet one day), or is it too early ? regardless, I think it could be good to converge to a single key for sub operations

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's a bit soon
Because right now FEES type is not only for token transafer but also for OFFER and all other type of transaction where the users paid fees !

But yes if we want to support Token we will have to rework Type on XRP

@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

⚠️ E2E tests are required

Changes detected require e2e testing before merge (even before asking for any review).

🖥️ Desktop

-> Run Desktop E2E

  • Select "Run workflow"
  • Branch: fix/xrp-listoperation-fees
  • Device: nanoSP or stax

📱 Mobile

-> Run Mobile E2E

  • Select "Run workflow"
  • Branch: fix/xrp-listoperation-fees
  • Device: nanoX

Affected coins modules: xrp
https://ledger-live.allure.green.ledgerlabs.net/allure/reports/ae45292d-2cd4-46e3-89ed-818b4ded628c/

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

@qperrot qperrot force-pushed the fix/xrp-listoperation-fees branch from f9ac772 to 556714a Compare February 27, 2026 13:26
@sonarqubecloud
Copy link

@qperrot qperrot merged commit 80a0088 into develop Feb 27, 2026
97 checks passed
@qperrot qperrot deleted the fix/xrp-listoperation-fees branch February 27, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coin-modules coin-modules-api Has changes in the coin-framework/coin-modules APIs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants