From ade049d04964c73a080c3767c2575143f7884c27 Mon Sep 17 00:00:00 2001 From: Andrew Nguyen Date: Thu, 21 Dec 2023 15:17:42 +0700 Subject: [PATCH] update test --- ts-client/src/tests/farm.test.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ts-client/src/tests/farm.test.ts b/ts-client/src/tests/farm.test.ts index d75aaf7..d53ebb8 100644 --- a/ts-client/src/tests/farm.test.ts +++ b/ts-client/src/tests/farm.test.ts @@ -157,11 +157,11 @@ describe("Interact with mainnet farm", () => { const { program } = getFarmProgram(provider.connection); const poolAdrr = new PublicKey( - "29DQB5C97HgJg5EKQ2EtnvSk28sS93WkgmnaXErB7HtT" + "HCy855FgVxTqmz3YoSJVQi3E9bnHj1EqdjBUMbfySpxf" ); const poolState = await program.account.pool.fetchNullable(poolAdrr); const owner = new PublicKey( - "BULRqL3U2jPgwvz6HYCyBVq9BMtK94Y1Nz98KQop23aD" + "JBeYA7dmBGCNgaEdtqdoUnESwKJho5YvgXVNLgo4n3MM" ) const [userPda] = PublicKey.findProgramAddressSync( [owner.toBuffer(), poolAdrr.toBuffer()], @@ -172,7 +172,17 @@ describe("Interact with mainnet farm", () => { const { a, b } = getClaimableRewardSync(onchainTIme, userState, poolState); console.log(a.toNumber(), b.toNumber()) + + // simulate + let farm = await PoolFarmImpl.create( + provider.connection, + poolAdrr, + ); + + const { amountA, amountB } = await farm.getClaimableReward(owner); + console.log(amountA.toNumber(), amountB.toNumber()) }); + });