mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
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.
31 lines
710 B
C++
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
|