Fix more problems introduced by 6adb2ec

- Renamed canSendToAccount to canWithdraw, because the semantics are
  a little different from a payment. Notably, if withdrawing to self,
  you can still include a destination tag.
- Simplified the interface to canWithdraw to just pass in the
  STTx.
- preflightDestinationAndTag is pretty pointless now, so removed it.
This commit is contained in:
Ed Hennis
2025-10-24 00:03:32 -04:00
parent 7f2f6b8791
commit 78ef800e30
5 changed files with 69 additions and 71 deletions

View File

@@ -384,13 +384,6 @@ class LoanBroker_test : public beast::unit_test::suite
destination(AccountID{}),
ter(temMALFORMED));
// If a destination tag is specified, a destination must be
// specified, too
env(coverWithdraw(alice, keylet.key, vault.asset(1)),
dtag(123),
ter(temMALFORMED));
verifyCoverAmount(10);
// Withdraw some of the cover amount
env(coverWithdraw(alice, keylet.key, vault.asset(7)));
env.close();