diff --git a/initArgs.local.did b/initArgs.local.did index 1b4fb82..9e390e0 100644 --- a/initArgs.local.did +++ b/initArgs.local.did @@ -8,7 +8,7 @@ btcFlowerGen2 = 50000000; // 0.5 SEED }; stakePeriod = variant { seconds = 15 }; - rewardInterval = variant { seconds = 7 }; + rewardInterval = variant { seconds = 10 }; trilogyBonus = 15; // 15% } ) \ No newline at end of file diff --git a/test/stake.test.ts b/test/stake.test.ts index 43a56f2..bc77cec 100644 --- a/test/stake.test.ts +++ b/test/stake.test.ts @@ -103,16 +103,20 @@ describe('staking', () => { test('stake 3 flowers', async () => { expect((await agent.mainActor.getCallerUser()).neurons).toHaveLength(0); - let res1 = await agent.mainActor.stake(btcStakeFlower); - expect(res1).toHaveProperty('ok'); - expect((await agent.mainActor.getCallerUser()).neurons).toHaveLength(1); - - let res2 = await agent.mainActor.stake(ethStakeFlower); - expect(res2).toHaveProperty('ok'); - expect((await agent.mainActor.getCallerUser()).neurons).toHaveLength(2); - - let res3 = await agent.mainActor.stake(icpStakeFlower); - expect(res3).toHaveProperty('ok'); + await Promise.all([ + (async () => { + let res1 = await agent.mainActor.stake(btcStakeFlower); + expect(res1).toHaveProperty('ok'); + })(), + (async () => { + let res2 = await agent.mainActor.stake(ethStakeFlower); + expect(res2).toHaveProperty('ok'); + })(), + (async () => { + let res3 = await agent.mainActor.stake(icpStakeFlower); + expect(res3).toHaveProperty('ok'); + })(), + ]); let user = await agent.mainActor.getCallerUser(); let neurons = user.neurons; @@ -130,7 +134,7 @@ describe('staking', () => { }); test('wait for rewards', async () => { - await new Promise(resolve => setTimeout(resolve, 1000 * 7)); + await new Promise(resolve => setTimeout(resolve, 1000 * 10)); }); test('check rewards', async () => {