Files
rippled/src/test/jtx/impl/pay.cpp
Bart 1eb0fdac65 refactor: Rename ripple namespace to xrpl (#5982)
This change renames all occurrences of `namespace ripple` and `ripple::` to `namespace xrpl` and `xrpl::`, respectively, as well as the names of test suites. It also provides a script to allow developers to replicate the changes in their local branch or fork to avoid conflicts.
2025-12-11 16:51:49 +00:00

31 lines
710 B
C++

#include <test/jtx/pay.h>
#include <xrpl/protocol/TxFlags.h>
#include <xrpl/protocol/jss.h>
namespace xrpl {
namespace test {
namespace jtx {
Json::Value
pay(AccountID const& account, AccountID const& to, AnyAmount amount)
{
amount.to(to);
Json::Value jv;
jv[jss::Account] = to_string(account);
jv[jss::Amount] = amount.value.getJson(JsonOptions::none);
jv[jss::Destination] = to_string(to);
jv[jss::TransactionType] = jss::Payment;
jv[jss::Flags] = tfFullyCanonicalSig;
return jv;
}
Json::Value
pay(Account const& account, Account const& to, AnyAmount amount)
{
return pay(account.id(), to.id(), amount);
}
} // namespace jtx
} // namespace test
} // namespace xrpl