difftreelog
test getTotalStaked increased after payoutStakers
in: master
1 file changed
tests/src/app-promotion.test.tsdiffbeforeafterboth661 });661 });662 });662 });663664 it.only('should increase total staked', async() => {665 await usingPlaygrounds(async (helper) => {666 const staker = accounts.pop()!;667 const totalStakedBefore = await helper.staking.getTotalStaked();668669 await helper.staking.stake(staker, 100n * nominal);670 671 const stakedInBlock = (await helper.staking.getTotalStakedPerBlock({Substrate: staker.address}))[0][0];672 await helper.wait.forRelayBlockNumber(rewardAvailableInBlock(stakedInBlock));673674 await helper.signTransaction(palletAdmin, helper.api!.tx.appPromotion.payoutStakers(100));675 const totalStakedAfter = await helper.staking.getTotalStaked();676677 console.log(totalStakedBefore + calculateIncome(100n * nominal, 10n));678 expect(totalStakedBefore + calculateIncome(100n * nominal, 10n)).to.be.equal(totalStakedAfter);679 });680 });663681664 it('should credit 0.05% for staking period', async () => { 682 it('should credit 0.05% for staking period', async () => { 665 await usingPlaygrounds(async helper => {683 await usingPlaygrounds(async helper => {