Sponsored Content
Skip to content

fix: Change AMMClawback return code to tecNO_PERMISSION - #6946

Merged
bthomee merged 2 commits into
developfrom
gregtatcam/mpt/ammclawback-fix
Apr 17, 2026
Merged

fix: Change AMMClawback return code to tecNO_PERMISSION#6946
bthomee merged 2 commits into
developfrom
gregtatcam/mpt/ammclawback-fix

Conversation

@gregtatcam

Copy link
Copy Markdown
Contributor

High Level Overview of Change

Change AMMClawback return code to tecNO_PERMISSION on AllowTrustLineClawback and NoFreeze check.

Context of Change

Change tesSUCCESS to tecNO_PERMISSION.

Test Plan

Extend AMMClawback unit-test with featureMPTokensV2 disabled.

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

Copy link
Copy Markdown
Contributor

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: V15

jtx::testable_amendments() - featureSingleAssetVault - featureLendingProtocol;

testInvalidRequest();
testInvalidRequest(all);

@mvadari mvadari Apr 14, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be in the for loop below? Should we have such tests for all the AMM/DEX tests files?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think so. It doesn't need testing with other amendments disabled.

The following tests would have to be extended to test for featureMPTokenV2 disabled: AMM, AMMExtended, Check, Flow, Offer, Path. It's a lot of tests and might significantly increase the overall unit-tests execution time. It still might be worth doing. It'll be a lot of changes in these tests so it's worth having another PR.

@codecov

codecov Bot commented Apr 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.6%. Comparing base (6a0ce46) to head (a903cab).
⚠️ Report is 6 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #6946     +/-   ##
=========================================
- Coverage     81.6%   81.6%   -0.0%     
=========================================
  Files         1010    1010             
  Lines        75973   75973             
  Branches      7610    7601      -9     
=========================================
- Hits         61993   61991      -2     
- Misses       13980   13982      +2     
Files with missing lines Coverage Δ
src/libxrpl/tx/transactors/dex/AMMClawback.cpp 98.1% <100.0%> (+2.6%) ⬆️

... and 6 files with indirect coverage changes

Impacted file tree graph

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

@yinyiqian1 yinyiqian1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@gregtatcam gregtatcam added the Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. label Apr 15, 2026

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

Copy link
Copy Markdown
Contributor

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: V15

@bthomee
bthomee added this pull request to the merge queue Apr 17, 2026
Merged via the queue into develop with commit affe583 Apr 17, 2026
3 checks passed
@bthomee
bthomee deleted the gregtatcam/mpt/ammclawback-fix branch April 17, 2026 14:45
marek-foss-neti pushed a commit to marek-foss-neti/rippled that referenced this pull request May 5, 2026
beartec-jpg pushed a commit to beartec-jpg/FalconLedger that referenced this pull request Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AMMClawback preclaim returns tesSUCCESS instead of tecNO_PERMISSION for unauthorized clawback

5 participants