Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsource147 committed Dec 21, 2023
1 parent 9810aab commit ade049d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions ts-client/src/tests/farm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()],
Expand All @@ -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())
});



});

0 comments on commit ade049d

Please sign in to comment.