mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-11 14:09:15 +00:00
Don't withdraw everything at once
This commit is contained in:
parent
6c093d4eee
commit
3b228e440b
@ -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" });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user