From 7e76e83884d9444d163a0951e7ae698daebf15ef Mon Sep 17 00:00:00 2001 From: woodser Date: Fri, 23 Dec 2022 13:06:13 +0000 Subject: [PATCH] start seednode with monerod address --- docker/docker-compose.yml | 2 ++ src/HavenoClient.test.ts | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 064bc6fe..9cf276d4 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -73,6 +73,7 @@ services: "--useDevPrivilegeKeys=true", "--nodePort=2002", "--appName=haveno-XMR_LOCAL_Seed1_2002", + "--xmrNode=http://localhost:28081" ] network_mode: "host" depends_on: @@ -88,6 +89,7 @@ services: "--useDevPrivilegeKeys=true", "--nodePort=3002", "--appName=haveno-XMR_LOCAL_Seed2_3002", + "--xmrNode=http://localhost:28081" ] network_mode: "host" depends_on: diff --git a/src/HavenoClient.test.ts b/src/HavenoClient.test.ts index 8edd57e1..f062dcb8 100644 --- a/src/HavenoClient.test.ts +++ b/src/HavenoClient.test.ts @@ -2062,7 +2062,6 @@ async function executeTrade(ctx?: TradeContext): Promise { if (!ctx.concurrentTrades) { const buyerBalancesAfter = await ctx.buyer!.getBalances(); const sellerBalancesAfter = await ctx.seller.getBalances(); - // TODO: getBalance() = available + pending + reserved offers? would simplify this equation const buyerFee = BigInt(buyerBalancesBefore.getBalance()) + BigInt(buyerBalancesBefore.getReservedOfferBalance()) + BigInt(offer!.getAmount()) - (BigInt(buyerBalancesAfter.getBalance()) + BigInt(buyerBalancesAfter.getReservedOfferBalance())); // buyer fee = total balance before + offer amount - total balance after const sellerFee = BigInt(sellerBalancesBefore.getBalance()) + BigInt(sellerBalancesBefore.getReservedOfferBalance()) - BigInt(offer!.getAmount()) - (BigInt(sellerBalancesAfter.getBalance()) + BigInt(sellerBalancesAfter.getReservedOfferBalance())); // seller fee = total balance before - offer amount - total balance after expect(buyerFee).toBeLessThanOrEqual(TestConfig.maxFee);