mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-23 07:10:53 +00:00
30 lines
546 B
C++
30 lines
546 B
C++
#include <test/jtx/fee.h>
|
|
|
|
#include <test/jtx/Env.h>
|
|
#include <test/jtx/JTx.h>
|
|
|
|
#include <xrpl/protocol/SField.h>
|
|
|
|
#include <cassert>
|
|
|
|
namespace xrpl::test::jtx {
|
|
|
|
void
|
|
Fee::operator()(Env& env, JTx& jt) const
|
|
{
|
|
if (!manual_)
|
|
return;
|
|
jt.fillFee = false;
|
|
assert(!increment_ || !amount_);
|
|
if (increment_)
|
|
{
|
|
jt[sfFee] = STAmount(env.current()->fees().increment).getJson();
|
|
}
|
|
else if (amount_)
|
|
{
|
|
jt[sfFee] = amount_->getJson(JsonOptions::Values::None);
|
|
}
|
|
}
|
|
|
|
} // namespace xrpl::test::jtx
|