From 5abb72ec0a46ffd6048a12e7319eda2a6665679d Mon Sep 17 00:00:00 2001 From: Vito <5780819+Tapanito@users.noreply.github.com> Date: Wed, 3 Jun 2026 17:58:02 +0200 Subject: [PATCH] test: Add withdrawal-to-issuer assertion in IOU global-freeze test Mirror the MPT and trust-line-freeze variants: under global freeze the redemption path (dstAcct == vaultAsset.getIssuer()) should still succeed. --- src/libxrpl/tx/transactors/vault/VaultWithdraw.cpp | 2 +- src/test/app/Vault_test.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libxrpl/tx/transactors/vault/VaultWithdraw.cpp b/src/libxrpl/tx/transactors/vault/VaultWithdraw.cpp index 52631b8abe..1601746183 100644 --- a/src/libxrpl/tx/transactors/vault/VaultWithdraw.cpp +++ b/src/libxrpl/tx/transactors/vault/VaultWithdraw.cpp @@ -283,7 +283,7 @@ VaultWithdraw::doApply() auto const freezeHandling = redeemingToIssuer ? FreezeHandling::IgnoreFreeze : FreezeHandling::ZeroIfFrozen; - // Share freeze checks are transitive. We skip them when withdrawing to the issuer all together. + // Share freeze checks are transitive. We skip them when withdrawing to the issuer alltogether. if (accountHolds(view(), accountID_, share, freezeHandling, AuthHandling::IgnoreAuth, j_) < sharesRedeemed) { diff --git a/src/test/app/Vault_test.cpp b/src/test/app/Vault_test.cpp index 78b571319e..4ec4364fb1 100644 --- a/src/test/app/Vault_test.cpp +++ b/src/test/app/Vault_test.cpp @@ -3538,6 +3538,11 @@ class Vault_test : public beast::unit_test::Suite env(tx, Ter{tecFROZEN}); env.close(); + // Withdrawal to the IOU issuer succeeds (redemption path) + tx[sfDestination] = issuer.human(); + env(tx); + env.close(); + // Cannot deposit some more tx = vault.deposit({.depositor = owner, .id = keylet.key, .amount = asset(10)});