mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-19 18:15:50 +00:00
Add Remit test to AMM Account
This commit is contained in:
@@ -3302,6 +3302,13 @@ private:
|
||||
ter(tecNO_PERMISSION));
|
||||
});
|
||||
|
||||
// Can't pay into AMM with Remit.
|
||||
testAMM([&](AMM& ammAlice, Env& env) {
|
||||
env(remit::remit(carol, ammAlice.ammAccount()),
|
||||
remit::amts({XRP(1)}),
|
||||
ter(tecNO_PERMISSION));
|
||||
});
|
||||
|
||||
// Pay amounts close to one side of the pool
|
||||
testAMM(
|
||||
[&](AMM& ammAlice, Env& env) {
|
||||
|
||||
@@ -27,15 +27,15 @@ namespace remit {
|
||||
|
||||
Json::Value
|
||||
remit(
|
||||
jtx::Account const& account,
|
||||
jtx::Account const& dest,
|
||||
AccountID const& account,
|
||||
AccountID const& dest,
|
||||
std::optional<std::uint32_t> const& dstTag)
|
||||
{
|
||||
using namespace jtx;
|
||||
Json::Value jv;
|
||||
jv[jss::TransactionType] = jss::Remit;
|
||||
jv[jss::Account] = account.human();
|
||||
jv[jss::Destination] = dest.human();
|
||||
jv[jss::Account] = to_string(account);
|
||||
jv[jss::Destination] = to_string(dest);
|
||||
if (dstTag)
|
||||
jv[sfDestinationTag.jsonName] = *dstTag;
|
||||
return jv;
|
||||
|
||||
@@ -32,8 +32,8 @@ namespace remit {
|
||||
|
||||
Json::Value
|
||||
remit(
|
||||
jtx::Account const& account,
|
||||
jtx::Account const& dest,
|
||||
AccountID const& account,
|
||||
AccountID const& dest,
|
||||
std::optional<std::uint32_t> const& dstTag = std::nullopt);
|
||||
|
||||
/** Sets the optional Amount on a JTx. */
|
||||
@@ -125,4 +125,4 @@ public:
|
||||
} // namespace test
|
||||
} // namespace ripple
|
||||
|
||||
#endif // RIPPLE_TEST_JTX_REMIT_H_INCLUDED
|
||||
#endif // RIPPLE_TEST_JTX_REMIT_H_INCLUDED
|
||||
|
||||
Reference in New Issue
Block a user