mirror of
https://github.com/Xahau/xahaud.git
synced 2026-07-30 18:40:10 +00:00
Introduce Credentials support (XLS-70d): (#5103)
Amendment:
- Credentials
New Transactions:
- CredentialCreate
- CredentialAccept
- CredentialDelete
Modified Transactions:
- DepositPreauth
- Payment
- EscrowFinish
- PaymentChannelClaim
- AccountDelete
New Object:
- Credential
Modified Object:
- DepositPreauth
API updates:
- ledger_entry
- account_objects
- ledger_data
- deposit_authorized
Read full spec: https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0070d-credentials
This commit is contained in:
@@ -301,14 +301,23 @@ MPTTester::pay(
|
||||
Account const& src,
|
||||
Account const& dest,
|
||||
std::int64_t amount,
|
||||
std::optional<TER> err)
|
||||
std::optional<TER> err,
|
||||
std::optional<std::vector<std::string>> credentials)
|
||||
{
|
||||
if (!id_)
|
||||
Throw<std::runtime_error>("MPT has not been created");
|
||||
auto const srcAmt = getBalance(src);
|
||||
auto const destAmt = getBalance(dest);
|
||||
auto const outstnAmt = getBalance(issuer_);
|
||||
env_(jtx::pay(src, dest, mpt(amount)), ter(err.value_or(tesSUCCESS)));
|
||||
|
||||
if (credentials)
|
||||
env_(
|
||||
jtx::pay(src, dest, mpt(amount)),
|
||||
ter(err.value_or(tesSUCCESS)),
|
||||
credentials::ids(*credentials));
|
||||
else
|
||||
env_(jtx::pay(src, dest, mpt(amount)), ter(err.value_or(tesSUCCESS)));
|
||||
|
||||
if (env_.ter() != tesSUCCESS)
|
||||
amount = 0;
|
||||
if (close_)
|
||||
|
||||
Reference in New Issue
Block a user