LoanBrokerSet will charge a reserve increment when creating

- Refactor: Add a Transactor base function to make it easier to get the
  owner reserve increment as a fee.
- Refactor: Add an overload jtx::fee(increment) to pay an owner reserve.
This commit is contained in:
Ed Hennis
2025-04-09 14:57:38 -04:00
parent 781136ed2e
commit cc0fe0db07
13 changed files with 76 additions and 17 deletions

View File

@@ -1319,21 +1319,16 @@ class Invariants_test : public beast::unit_test::suite
auto [tx, vKeylet] =
vault.create({.owner = a, .asset = xrpAsset});
env(tx);
env.close();
BEAST_EXPECT(env.le(vKeylet));
vaultID = vKeylet.key;
env(vault.deposit(
{.depositor = a, .id = vaultID, .amount = xrpAsset(50)}));
env.close();
// Create Loan Broker
using namespace loanBroker;
loanBrokerKeylet = keylet::loanbroker(a.id(), env.seq(a));
// Create a Loan Broker with all default values.
env(set(a, vaultID));
env(set(a, vaultID), fee(increment));
return BEAST_EXPECT(env.le(loanBrokerKeylet));
};