Change error code to tecLOCKED

This commit is contained in:
Bronek Kozicki
2025-04-03 11:33:17 +01:00
parent 85e7d293ca
commit 392e3846ed
2 changed files with 4 additions and 4 deletions

View File

@@ -973,10 +973,10 @@ class Vault_test : public beast::unit_test::suite
{.depositor = depositor,
.id = keylet.key,
.amount = asset(100)});
env(tx, ter(tecFROZEN));
env(tx, ter(tecLOCKED));
tx[sfDestination] = issuer.human();
env(tx, ter(tecFROZEN));
env(tx, ter(tecLOCKED));
});
testCase([this](

View File

@@ -118,10 +118,10 @@ VaultWithdraw::preclaim(PreclaimContext const& ctx)
// Cannot withdraw from a Vault an Asset frozen for the destination account
if (isFrozen(ctx.view, dstAcct, asset))
return tecFROZEN;
return asset.holds<Issue>() ? tecFROZEN : tecLOCKED;
if (isFrozen(ctx.view, account, share))
return tecFROZEN;
return tecLOCKED;
return tesSUCCESS;
}