From 3b228e440b9288958c6cefd52a63caad08774836 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Sun, 24 May 2020 21:20:10 +0200 Subject: [PATCH] Don't withdraw everything at once --- packages/demo-staking/src/index.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/demo-staking/src/index.spec.ts b/packages/demo-staking/src/index.spec.ts index f939f59e..8ac05548 100644 --- a/packages/demo-staking/src/index.spec.ts +++ b/packages/demo-staking/src/index.spec.ts @@ -122,7 +122,7 @@ describe("Staking demo", () => { }); } - const unbondMsg: HandleMsg = { unbond: { amount: "112233" } }; + const unbondMsg: HandleMsg = { unbond: { amount: "110000" } }; // await ownerClient.execute(contractAddress, unbondMsg); await userClient.execute(contractAddress, unbondMsg); @@ -130,14 +130,14 @@ describe("Staking demo", () => { { const query: QueryMsg = { balance: { address: userAddress } }; const response: BalanceResponse = await ownerClient.queryContractSmart(contractAddress, query); - expect(response).toEqual({ balance: "0" }); + expect(response).toEqual({ balance: "2233" }); } - // Check collected tax (0.5 % of 112233) + // Check collected tax (0.5 % of 110000) { const query: QueryMsg = { balance: { address: ownerAddress } }; const response: BalanceResponse = await ownerClient.queryContractSmart(contractAddress, query); - expect(response).toEqual({ balance: "561" }); + expect(response).toEqual({ balance: "550" }); } }); });