From e635b345d0d3330d83bc65b551c0b7afd2fd4b8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Rodriguez?= Date: Tue, 5 Nov 2024 18:24:35 -0300 Subject: [PATCH] Fix `S22C500` smoke test (#3030) * fix S22C500 * use proper endpoints * update stagenet endpoints * fmt --- test/moonwall.config.json | 20 ++++++++------------ test/suites/smoke/test-staking-rewards.ts | 4 ++-- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/test/moonwall.config.json b/test/moonwall.config.json index a1a7a7c9e8..fbd15e67f9 100644 --- a/test/moonwall.config.json +++ b/test/moonwall.config.json @@ -144,17 +144,17 @@ { "name": "ethers", "type": "ethers", - "endpoints": ["wss://wss.api.moondev.network"] + "endpoints": ["wss://stagenet-unlimited.api.moondev.network"] }, { "name": "viem", "type": "viem", - "endpoints": ["wss://wss.api.moondev.network"] + "endpoints": ["wss://stagenet-unlimited.api.moondev.network"] }, { "name": "para", "type": "polkadotJs", - "endpoints": ["wss://wss.api.moondev.network"], + "endpoints": ["wss://stagenet-unlimited.api.moondev.network"], "rpc": { "moon": { "isBlockFinalized": { @@ -172,9 +172,7 @@ { "name": "relay", "type": "polkadotJs", - "endpoints": [ - "wss://deo-moon-moondev-1-stagenet-relay-rpc-1.rv.moondev.network " - ] + "endpoints": ["wss://stagenet-relay.api.moondev.network"] } ] }, @@ -312,17 +310,17 @@ { "name": "ethers", "type": "ethers", - "endpoints": ["wss://wss.api.moonbase.moonbeam.network"] + "endpoints": ["wss://trace.api.moonbase.moonbeam.network"] }, { "name": "viem", "type": "viem", - "endpoints": ["wss://wss.api.moonbase.moonbeam.network"] + "endpoints": ["wss://trace.api.moonbase.moonbeam.network"] }, { "name": "para", "type": "polkadotJs", - "endpoints": ["wss://wss.api.moonbase.moonbeam.network"], + "endpoints": ["wss://trace.api.moonbase.moonbeam.network"], "rpc": { "moon": { "isBlockFinalized": { @@ -341,9 +339,7 @@ { "name": "relay", "type": "polkadotJs", - "endpoints": [ - "wss://frag-moonbase-relay-rpc-ws.g.moonbase.moonbeam.network" - ] + "endpoints": ["wss://relay.api.moonbase.moonbeam.network"] } ] }, diff --git a/test/suites/smoke/test-staking-rewards.ts b/test/suites/smoke/test-staking-rewards.ts index 310896a4f5..5eab18c0d0 100644 --- a/test/suites/smoke/test-staking-rewards.ts +++ b/test/suites/smoke/test-staking-rewards.ts @@ -612,7 +612,7 @@ describeSuite({ // calculate total staking reward const firstBlockRewardedEvents = await payment.delayedPayoutRound.firstBlockApi.query.system.events(); - const reservedInflation = new BN(0); + let reservedInflation = new BN(0); for (const { phase, event } of firstBlockRewardedEvents) { if (!phase.isInitialization) { continue; @@ -620,7 +620,7 @@ describeSuite({ const eventTypes = payment.delayedPayoutRound.firstBlockApi.events; // only deduct parachainBondReward if it was transferred (event must exist) if (eventTypes.parachainStaking.InflationDistributed.is(event)) { - reservedInflation.addn(event.data.value.toNumber()); + reservedInflation = reservedInflation.add(new BN(event.data.value.toString())); } }