From fc2ca065108fe4fef3188109f5e1b7b0739608d7 Mon Sep 17 00:00:00 2001 From: skynetcap <100323448+skynetcap@users.noreply.github.com> Date: Sat, 18 Nov 2023 23:44:53 -0800 Subject: [PATCH] Phoenix tests: Add JitoSol test --- phoenix/src/test/java/PhoenixTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phoenix/src/test/java/PhoenixTest.java b/phoenix/src/test/java/PhoenixTest.java index bd9caab..02a54da 100644 --- a/phoenix/src/test/java/PhoenixTest.java +++ b/phoenix/src/test/java/PhoenixTest.java @@ -83,8 +83,8 @@ public void phoenixGetJitoSolMarketTest() throws RpcException { (o1, o2) -> Math.toIntExact(o2.component1().getPriceInTicks() - o1.getFirst().getPriceInTicks()) ).toList(); asks.forEach(fifoOrderIdFIFORestingOrderPair -> { - log.info(String.format("Ask: $%.2f, Size: %.2f SOL, Trader: %s", - (double) fifoOrderIdFIFORestingOrderPair.getFirst().getPriceInTicks() / phoenixMarket.getTickSizeInQuoteLotsPerBaseUnit(), + log.info(String.format("Ask: %.4f, Size: %.2f SOL, Trader: %s", + (double) fifoOrderIdFIFORestingOrderPair.getFirst().getPriceInTicks() / header.getBaseLotSize(), (double) fifoOrderIdFIFORestingOrderPair.getSecond().getNumBaseLots() / phoenixMarket.getBaseLotsPerBaseUnit(), phoenixMarket.getTradersSanitized().get((int) (fifoOrderIdFIFORestingOrderPair.getSecond().getTraderIndex() - 1)).getFirst().toBase58())); }); @@ -93,8 +93,8 @@ public void phoenixGetJitoSolMarketTest() throws RpcException { (o1, o2) -> Math.toIntExact(o2.component1().getPriceInTicks() - o1.getFirst().getPriceInTicks()) ).toList(); bids.forEach(fifoOrderIdFIFORestingOrderPair -> { - log.info(String.format("Bid: $%.2f, Size: %.2f SOL, Trader: %s", - (double) fifoOrderIdFIFORestingOrderPair.getFirst().getPriceInTicks() / phoenixMarket.getTickSizeInQuoteLotsPerBaseUnit(), + log.info(String.format("Bid: %.4f, Size: %.2f SOL, Trader: %s", + (double) fifoOrderIdFIFORestingOrderPair.getFirst().getPriceInTicks() / header.getBaseLotSize(), (double) fifoOrderIdFIFORestingOrderPair.getSecond().getNumBaseLots() / phoenixMarket.getBaseLotsPerBaseUnit(), phoenixMarket.getTradersSanitized().get((int) (fifoOrderIdFIFORestingOrderPair.getSecond().getTraderIndex() - 1)).getFirst().toBase58())); });