Files
rippled/src/test/jtx/impl/offer.cpp
Ayaz Salikhov 5f638f5553 chore: Set ColumnLimit to 120 in clang-format (#6288)
This change updates the ColumnLimit from 80 to 120, and applies clang-format to reformat the code.
2026-01-28 18:09:50 +00:00

35 lines
834 B
C++

#include <test/jtx/offer.h>
#include <xrpl/protocol/jss.h>
namespace xrpl {
namespace test {
namespace jtx {
Json::Value
offer(Account const& account, STAmount const& takerPays, STAmount const& takerGets, std::uint32_t flags)
{
Json::Value jv;
jv[jss::Account] = account.human();
jv[jss::TakerPays] = takerPays.getJson(JsonOptions::none);
jv[jss::TakerGets] = takerGets.getJson(JsonOptions::none);
if (flags)
jv[jss::Flags] = flags;
jv[jss::TransactionType] = jss::OfferCreate;
return jv;
}
Json::Value
offer_cancel(Account const& account, std::uint32_t offerSeq)
{
Json::Value jv;
jv[jss::Account] = account.human();
jv[jss::OfferSequence] = offerSeq;
jv[jss::TransactionType] = jss::OfferCancel;
return jv;
}
} // namespace jtx
} // namespace test
} // namespace xrpl