Skip to content

Commit

Permalink
Update AMMInfo with non-zero fee
Browse files Browse the repository at this point in the history
  • Loading branch information
gregtatcam committed Sep 21, 2023
1 parent e5d4109 commit 994b00a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/rpc/AMMInfo_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class AMMInfo_test : public jtx::AMMTestBase
BEAST_EXPECT(ammAlice.expectAmmRpcInfo(
XRP(10000), USD(10000), IOUAmount{10000000, 0}));
std::unordered_map<std::string, std::uint16_t> votes;
votes.insert({alice.human(), 0});
votes.insert({alice.human(), 10});
for (int i = 0; i < 7; ++i)
{
Account a(std::to_string(i));
Expand All @@ -126,15 +126,15 @@ class AMMInfo_test : public jtx::AMMTestBase
ammAlice.deposit(a, 10000000);
ammAlice.vote(a, 50 * (i + 1));
}
BEAST_EXPECT(ammAlice.expectTradingFee(175));
BEAST_EXPECT(ammAlice.expectTradingFee(176));
Account ed("ed");
Account bill("bill");
env.fund(XRP(1000), bob, ed, bill);
ammAlice.bid(alice, 100, std::nullopt, {carol, bob, ed, bill});
BEAST_EXPECT(ammAlice.expectAmmRpcInfo(
XRP(80000),
USD(80000),
IOUAmount{79994400},
IOUAmount{79994368},
std::nullopt,
std::nullopt,
ammAlice.ammAccount()));
Expand Down Expand Up @@ -187,7 +187,7 @@ class AMMInfo_test : public jtx::AMMTestBase
auctionSlot[jss::account].asString() == alice.human() &&
auctionSlot[jss::discounted_fee].asUInt() == 17 &&
auctionSlot[jss::price][jss::value].asString() ==
"5600" &&
"5632" &&
auctionSlot[jss::price][jss::currency].asString() ==
to_string(ammAlice.lptIssue().currency) &&
auctionSlot[jss::price][jss::issuer].asString() ==
Expand Down

0 comments on commit 994b00a

Please sign in to comment.