Skip to content

Conversation

@vlntb
Copy link
Collaborator

@vlntb vlntb commented Dec 5, 2025

High Level Overview of Change

VaultWithdraw was incorrectly rejecting withdrawals of frozen IOU assets in all cases, including withdrawals back to the asset issuer. This behavior violated the XRP Ledger protocol, which allows frozen IOU
assets to be returned to their issuer.

Context of Change

Two issues were fixed:

  1. The checkFrozen() calls in preclaim() were always executed, even when the destination or submitter was the asset issuer
  2. The accountHolds() call in doApply() was hardcoded to use FreezeHandling::fhZERO_IF_FROZEN, treating frozen shares as zero balance even for issuer-involved transactions

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)
  • Performance (increase or change in throughput and/or latency)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

@vlntb vlntb requested a review from ximinez December 5, 2025 10:53
@vlntb vlntb marked this pull request as ready for review December 5, 2025 10:53
@vlntb vlntb requested a review from Tapanito December 5, 2025 10:53
@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.1%. Comparing base (5224636) to head (efae404).

Additional details and impacted files

Impacted file tree graph

@@                      Coverage Diff                       @@
##           ximinez/lending-XLS-66-ongoing   #6113   +/-   ##
==============================================================
  Coverage                            79.1%   79.1%           
==============================================================
  Files                                 839     839           
  Lines                               71370   71381   +11     
  Branches                             8322    8324    +2     
==============================================================
+ Hits                                56453   56463   +10     
- Misses                              14917   14918    +1     
Files with missing lines Coverage Δ
src/xrpld/app/tx/detail/VaultWithdraw.cpp 99.2% <100.0%> (+0.1%) ⬆️

... and 2 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.

@vlntb vlntb changed the title Frozen assets should still be withdrawable Frozen IOUs should still be transferrable to the issuer Dec 5, 2025
@vlntb vlntb changed the title Frozen IOUs should still be transferrable to the issuer Frozen IOUs should still be transferable to the issuer Dec 5, 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.

2 participants