From 979142909adf8346346c5223275112a542e0272b Mon Sep 17 00:00:00 2001 From: Andy Nelson Date: Wed, 27 Mar 2024 17:18:29 +0000 Subject: [PATCH] fix: withdraw offer test was supplying an extra parameter --- tests/nft-lend-borrow.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/nft-lend-borrow.ts b/tests/nft-lend-borrow.ts index ecd00a2..99eb881 100644 --- a/tests/nft-lend-borrow.ts +++ b/tests/nft-lend-borrow.ts @@ -356,9 +356,9 @@ describe("nft-lend-borrow", () => { assert.isAbove( borrowerAccount.lamports, borrowerInitialBalance + - offerAmount.toNumber() - - (minimumBalanceForRentExemption + - minimumBalanceForRentExemptionForOfferAccount * 2) + offerAmount.toNumber() - + (minimumBalanceForRentExemption + + minimumBalanceForRentExemptionForOfferAccount * 2) ); const vaultAssetTokenAccount = await getAccount( @@ -604,9 +604,9 @@ describe("nft-lend-borrow", () => { assert.approximately( borrowerAccount.lamports, borrowerInitialBalance + - offerAmount.toNumber() - - (minimumBalanceForRentExemption + - minimumBalanceForRentExemptionForOfferAccount), + offerAmount.toNumber() - + (minimumBalanceForRentExemption + + minimumBalanceForRentExemptionForOfferAccount), 0.5 * LAMPORTS_PER_SOL ); @@ -734,8 +734,7 @@ describe("nft-lend-borrow", () => { await program.methods .withdrawOffer( - new anchor.BN(minimumBalanceForRentExemption), - collectionId + new anchor.BN(minimumBalanceForRentExemption) ) .accounts({ offerLoan: offerPDA,