Skip to content

feat: Support XLS-39 Clawback amendment in xrpl-rust#163

Merged
ckeshava merged 7 commits into
XRPLF:mainfrom
ckeshava:Clawback
Jun 23, 2026
Merged

feat: Support XLS-39 Clawback amendment in xrpl-rust#163
ckeshava merged 7 commits into
XRPLF:mainfrom
ckeshava:Clawback

Conversation

@ckeshava

Copy link
Copy Markdown
Collaborator

High Level Overview of Change

This PR adds support for the Clawback amendment in xrpl-rust library.
The XLS specification can be found here: https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0039-clawback
The rippled C++ PR implementation is here: XRPLF/rippled#4553

This PR adds only one transaction Clawback. The included integration tests also validate the correctness of AccountInfo RPC after the setting of the lsfAllowTrustLineClawback flag.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Tests (You added tests for code that already exists, or your new feature included in this PR)
  • Documentation Updates
  • Release

Before / After

Test Plan

Appropriate tests have been included.

@ckeshava

Copy link
Copy Markdown
Collaborator Author

/ai-review

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues.

Review by Claude Opus 4.6 · Prompt: V14

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.26389% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.49%. Comparing base (5803152) to head (a9c405b).

Files with missing lines Patch % Lines
src/models/transactions/clawback.rs 98.58% 4 Missing ⚠️
src/models/transactions/account_set.rs 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #163      +/-   ##
==========================================
+ Coverage   84.33%   84.49%   +0.16%     
==========================================
  Files         226      227       +1     
  Lines       23958    24245     +287     
==========================================
+ Hits        20205    20487     +282     
- Misses       3753     3758       +5     
Flag Coverage Δ
integration 71.32% <100.00%> (ø)
unit 85.20% <98.25%> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/asynch/clients/async_client.rs 100.00% <100.00%> (ø)
src/models/exceptions.rs 90.90% <100.00%> (+0.90%) ⬆️
src/models/results/server_state.rs 100.00% <ø> (ø)
src/models/transactions/mod.rs 56.37% <ø> (ø)
src/models/transactions/account_set.rs 82.97% <0.00%> (-0.17%) ⬇️
src/models/transactions/clawback.rs 98.58% <98.58%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Adds unit tests for the previously-uncovered positional constructor,
the with_holder builder, and the Transaction trait getters, lifting
clawback.rs patch coverage above the 80% codecov gate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cybele-ripple cybele-ripple self-requested a review June 22, 2026 19:33
Comment thread src/models/transactions/clawback.rs Outdated
Comment thread src/models/transactions/account_set.rs
ckeshava and others added 3 commits June 22, 2026 14:21
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Parse both sides with from_str so the assertion is order-independent,
instead of comparing JSON text wrapped in Value::String. Addresses
review feedback on PR XRPLF#163.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ckeshava ckeshava requested a review from cybele-ripple June 22, 2026 21:41
@ckeshava ckeshava merged commit 49196f9 into XRPLF:main Jun 23, 2026
9 checks passed
@ckeshava

Copy link
Copy Markdown
Collaborator Author

thanks for the quick reviews @cybele-ripple @Patel-Raj11

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