diff --git a/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap b/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap index 6da3641d..d6157dc8 100644 --- a/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap +++ b/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap @@ -1,8 +1,8 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`sdk > getParachainBalances > should get expected balances for Centrifuge for substrate address 1`] = ` +exports[`sdk > getParachainBalances > on 'Centrifuge' for address: '4fAKSBMGVT9jt1jkuJvXgvMbmqV2BuspFWWEm…' > should get expected balances 1`] = ` [ - s { + a { "amount": 570000000000000000n, "decimals": 18, "key": "cfg", @@ -12,9 +12,9 @@ exports[`sdk > getParachainBalances > should get expected balances for Centrifug ] `; -exports[`sdk > getParachainBalances > should get expected balances for Centrifuge 1`] = ` +exports[`sdk > getParachainBalances > on 'Centrifuge' for address: '5FtGz8bgoCQ6pNAYLWCfxKx9ekLnX1ewP9q2T…' > should get expected balances 1`] = ` [ - s { + a { "amount": 570000000000000000n, "decimals": 18, "key": "cfg", @@ -24,52 +24,31 @@ exports[`sdk > getParachainBalances > should get expected balances for Centrifug ] `; -exports[`sdk > getParachainBalances > should get expected balances for HydraDX 1`] = ` +exports[`sdk > getParachainBalances > on 'HydraDX Alphanet' for address: '5FtGz8bgoCQ6pNAYLWCfxKx9ekLnX1ewP9q2T…' > should get expected balances 1`] = ` [ - s { - "amount": 37000000000000n, + a { + "amount": 178046239082538836n, "decimals": 18, - "key": "weth", - "originSymbol": "WETH", - "symbol": "WETH", - }, - s { - "amount": 120n, - "decimals": 8, - "key": "wbtc", - "originSymbol": "WBTC", - "symbol": "WBTC", - }, - s { - "amount": 0n, - "decimals": 6, - "key": "usdtwh", - "originSymbol": "USDT.Wh", - "symbol": "USDT.Wh", + "key": "ftmwh", + "originSymbol": "FTM.wh", + "symbol": "FTM.wh", }, - s { + a { "amount": 0n, "decimals": 6, "key": "usdcwh", "originSymbol": "USDC.Wh", "symbol": "USDC.Wh", }, - s { - "amount": 0n, - "decimals": 18, - "key": "dai", - "originSymbol": "DAI", - "symbol": "DAI", - }, - s { + a { "amount": 0n, "decimals": 18, - "key": "glmr", - "originSymbol": "GLMR", - "symbol": "GLMR", + "key": "dev", + "originSymbol": "DEV", + "symbol": "DEV", }, - s { - "amount": 1000000000000n, + a { + "amount": 3000000000000n, "decimals": 12, "key": "hdx", "originSymbol": "HDX", @@ -78,30 +57,30 @@ exports[`sdk > getParachainBalances > should get expected balances for HydraDX 1 ] `; -exports[`sdk > getParachainBalances > should get expected balances for HydraDX Alphanet 1`] = ` +exports[`sdk > getParachainBalances > on 'HydraDX Alphanet' for address: '7MR8Qxy9sJmN6bfHMggAtFY5DwLxfrssLuTnP…' > should get expected balances 1`] = ` [ - s { + a { "amount": 178046239082538836n, "decimals": 18, "key": "ftmwh", "originSymbol": "FTM.wh", "symbol": "FTM.wh", }, - s { + a { "amount": 0n, "decimals": 6, "key": "usdcwh", "originSymbol": "USDC.Wh", "symbol": "USDC.Wh", }, - s { + a { "amount": 0n, "decimals": 18, "key": "dev", "originSymbol": "DEV", "symbol": "DEV", }, - s { + a { "amount": 3000000000000n, "decimals": 12, "key": "hdx", @@ -111,31 +90,52 @@ exports[`sdk > getParachainBalances > should get expected balances for HydraDX A ] `; -exports[`sdk > getParachainBalances > should get expected balances for HydraDX Alphanet for substrate address 1`] = ` +exports[`sdk > getParachainBalances > on 'HydraDX' for address: '5FtGz8bgoCQ6pNAYLWCfxKx9ekLnX1ewP9q2T…' > should get expected balances 1`] = ` [ - s { - "amount": 178046239082538836n, + a { + "amount": 37000000000000n, "decimals": 18, - "key": "ftmwh", - "originSymbol": "FTM.wh", - "symbol": "FTM.wh", + "key": "weth", + "originSymbol": "WETH", + "symbol": "WETH", + }, + a { + "amount": 120n, + "decimals": 8, + "key": "wbtc", + "originSymbol": "WBTC", + "symbol": "WBTC", }, - s { + a { + "amount": 0n, + "decimals": 6, + "key": "usdtwh", + "originSymbol": "USDT.Wh", + "symbol": "USDT.Wh", + }, + a { "amount": 0n, "decimals": 6, "key": "usdcwh", "originSymbol": "USDC.Wh", "symbol": "USDC.Wh", }, - s { + a { "amount": 0n, "decimals": 18, - "key": "dev", - "originSymbol": "DEV", - "symbol": "DEV", + "key": "dai", + "originSymbol": "DAI", + "symbol": "DAI", }, - s { - "amount": 3000000000000n, + a { + "amount": 0n, + "decimals": 18, + "key": "glmr", + "originSymbol": "GLMR", + "symbol": "GLMR", + }, + a { + "amount": 1000000000000n, "decimals": 12, "key": "hdx", "originSymbol": "HDX", @@ -144,51 +144,51 @@ exports[`sdk > getParachainBalances > should get expected balances for HydraDX A ] `; -exports[`sdk > getParachainBalances > should get expected balances for HydraDX for substrate address 1`] = ` +exports[`sdk > getParachainBalances > on 'HydraDX' for address: '7MR8Qxy9sJmN6bfHMggAtFY5DwLxfrssLuTnP…' > should get expected balances 1`] = ` [ - s { + a { "amount": 37000000000000n, "decimals": 18, "key": "weth", "originSymbol": "WETH", "symbol": "WETH", }, - s { + a { "amount": 120n, "decimals": 8, "key": "wbtc", "originSymbol": "WBTC", "symbol": "WBTC", }, - s { + a { "amount": 0n, "decimals": 6, "key": "usdtwh", "originSymbol": "USDT.Wh", "symbol": "USDT.Wh", }, - s { + a { "amount": 0n, "decimals": 6, "key": "usdcwh", "originSymbol": "USDC.Wh", "symbol": "USDC.Wh", }, - s { + a { "amount": 0n, "decimals": 18, "key": "dai", "originSymbol": "DAI", "symbol": "DAI", }, - s { + a { "amount": 0n, "decimals": 18, "key": "glmr", "originSymbol": "GLMR", "symbol": "GLMR", }, - s { + a { "amount": 1000000000000n, "decimals": 12, "key": "hdx", @@ -198,93 +198,93 @@ exports[`sdk > getParachainBalances > should get expected balances for HydraDX f ] `; -exports[`sdk > getParachainBalances > should get expected balances for Moonbase Alpha 1`] = ` +exports[`sdk > getParachainBalances > on 'Moonbase Alpha' for address: '0x4E82143Af671Cc8201Bc7efCBbCED3A69e8…' > should get expected balances 1`] = ` [ - s { + a { "amount": 0n, "decimals": 18, "key": "agng", "originSymbol": "AGNG", "symbol": "AGNG", }, - s { + a { "amount": 0n, "decimals": 12, "key": "hdx", "originSymbol": "HDX", "symbol": "HDX", }, - s { + a { "amount": 1234567890000000000n, "decimals": 18, "key": "ftmwh", "originSymbol": "FTM.wh", "symbol": "FTM.wh", }, - s { + a { "amount": 10000n, "decimals": 6, "key": "usdcwh", "originSymbol": "USDC.Wh", "symbol": "USDC.Wh", }, - s { + a { "amount": 0n, "decimals": 12, "key": "unit", "originSymbol": "Unit", "symbol": "Unit", }, - s { + a { "amount": 0n, "decimals": 10, "key": "tur", "originSymbol": "TUR", "symbol": "TUR", }, - s { + a { "amount": 0n, "decimals": 18, "key": "tt1", "originSymbol": "TT1", "symbol": "TT1", }, - s { + a { "amount": 0n, "decimals": 12, "key": "pica", "originSymbol": "PICA", "symbol": "PICA", }, - s { + a { "amount": 0n, "decimals": 6, "key": "atom", "originSymbol": "ATOM", "symbol": "ATOM", }, - s { + a { "amount": 0n, "decimals": 12, "key": "otp", "originSymbol": "OTP", "symbol": "OTP", }, - s { + a { "amount": 0n, "decimals": 12, "key": "ampe", "originSymbol": "AMPE", "symbol": "AMPE", }, - s { + a { "amount": 10000000000000000n, "decimals": 18, "key": "alan", "originSymbol": "ALAN", "symbol": "ALAN", }, - s { + a { "amount": 6543210000000000000n, "decimals": 18, "key": "dev", @@ -294,30 +294,30 @@ exports[`sdk > getParachainBalances > should get expected balances for Moonbase ] `; -exports[`sdk > getParachainBalances > should get expected balances for Moonbase Beta 1`] = ` +exports[`sdk > getParachainBalances > on 'Moonbase Beta' for address: '0x4E82143Af671Cc8201Bc7efCBbCED3A69e8…' > should get expected balances 1`] = ` [ - s { + a { "amount": 100000000000000000n, "decimals": 18, "key": "ftmwh", "originSymbol": "FTM.wh", "symbol": "FTM.wh", }, - s { + a { "amount": 0n, "decimals": 6, "key": "usdcwh", "originSymbol": "USDC.Wh", "symbol": "USDC.Wh", }, - s { + a { "amount": 1100000000000000000n, "decimals": 18, "key": "alan", "originSymbol": "ALAN", "symbol": "ALAN", }, - s { + a { "amount": 1100000000000000000n, "decimals": 18, "key": "dev", @@ -327,275 +327,275 @@ exports[`sdk > getParachainBalances > should get expected balances for Moonbase ] `; -exports[`sdk > getParachainBalances > should get expected balances for Moonbeam 1`] = ` +exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671Cc8201Bc7efCBbCED3A69e8…' > should get expected balances 1`] = ` [ - s { + a { "amount": 0n, "decimals": 18, "key": "peaq", "originSymbol": "PEAQ", "symbol": "PEAQ", }, - s { + a { "amount": 0n, "decimals": 12, "key": "bncs", "originSymbol": "BNCS", "symbol": "BNCS", }, - s { + a { "amount": 0n, "decimals": 10, "key": "sub", "originSymbol": "SUB", "symbol": "SUB", }, - s { + a { "amount": 0n, "decimals": 10, "key": "ztg", "originSymbol": "ZTG", "symbol": "ZTG", }, - s { + a { "amount": 0n, "decimals": 18, "key": "fil", "originSymbol": "FIL", "symbol": "FIL", }, - s { + a { "amount": 0n, "decimals": 18, "key": "weth", "originSymbol": "WETH", "symbol": "WETH", }, - s { + a { "amount": 0n, "decimals": 8, "key": "wbtc", "originSymbol": "WBTC", "symbol": "WBTC", }, - s { + a { "amount": 0n, "decimals": 18, "key": "vmanta", "originSymbol": "vMANTA", "symbol": "vMANTA", }, - s { + a { "amount": 0n, "decimals": 18, "key": "vglmr", "originSymbol": "vGLMR", "symbol": "vGLMR", }, - s { + a { "amount": 0n, "decimals": 18, "key": "vfil", "originSymbol": "vFIL", "symbol": "vFIL", }, - s { + a { "amount": 0n, "decimals": 10, "key": "vdot", "originSymbol": "vDOT", "symbol": "vDOT", }, - s { + a { "amount": 0n, "decimals": 18, "key": "vastr", "originSymbol": "vASTR", "symbol": "vASTR", }, - s { + a { "amount": 0n, "decimals": 6, "key": "usdtwh", "originSymbol": "USDT.Wh", "symbol": "USDT.Wh", }, - s { + a { "amount": 0n, "decimals": 6, "key": "usdcwh", "originSymbol": "USDC.Wh", "symbol": "USDC.Wh", }, - s { + a { "amount": 0n, "decimals": 18, "key": "dai", "originSymbol": "DAI", "symbol": "DAI", }, - s { + a { "amount": 0n, "decimals": 12, "key": "hdx", "originSymbol": "HDX", "symbol": "HDX", }, - s { + a { "amount": 0n, "decimals": 10, "key": "ded", "originSymbol": "DED", "symbol": "DED", }, - s { + a { "amount": 0n, "decimals": 10, "key": "pink", "originSymbol": "PINK", "symbol": "PINK", }, - s { + a { "amount": 0n, "decimals": 6, "key": "usdc", "originSymbol": "USDC", "symbol": "USDC", }, - s { + a { "amount": 0n, "decimals": 6, "key": "usdt", "originSymbol": "USDT", "symbol": "USDT", }, - s { + a { "amount": 0n, "decimals": 18, "key": "ring", "originSymbol": "RING", "symbol": "RING", }, - s { + a { "amount": 0n, "decimals": 12, "key": "pha", "originSymbol": "PHA", "symbol": "PHA", }, - s { + a { "amount": 0n, "decimals": 12, "key": "pen", "originSymbol": "PEN", "symbol": "PEN", }, - s { + a { "amount": 0n, "decimals": 12, "key": "para", "originSymbol": "PARA", "symbol": "PARA", }, - s { + a { "amount": 0n, "decimals": 12, "key": "neuro", "originSymbol": "NEURO", "symbol": "NEURO", }, - s { + a { "amount": 0n, "decimals": 11, "key": "nodl", "originSymbol": "NODL", "symbol": "NODL", }, - s { + a { "amount": 0n, "decimals": 18, "key": "manta", "originSymbol": "MANTA", "symbol": "MANTA", }, - s { + a { "amount": 0n, "decimals": 10, "key": "ldot", "originSymbol": "LDOT", "symbol": "LDOT", }, - s { + a { "amount": 0n, "decimals": 10, "key": "intr", "originSymbol": "INTR", "symbol": "INTR", }, - s { + a { "amount": 0n, "decimals": 8, "key": "ibtc", "originSymbol": "IBTC", "symbol": "IBTC", }, - s { + a { "amount": 0n, "decimals": 9, "key": "eqd", "originSymbol": "EQD", "symbol": "EQD", }, - s { + a { "amount": 0n, "decimals": 9, "key": "eq", "originSymbol": "EQ", "symbol": "EQ", }, - s { + a { "amount": 330000000n, "decimals": 10, "key": "dot", "originSymbol": "DOT", "symbol": "DOT", }, - s { + a { "amount": 0n, "decimals": 18, "key": "cfg", "originSymbol": "CFG", "symbol": "CFG", }, - s { + a { "amount": 0n, "decimals": 12, "key": "bnc", "originSymbol": "BNC", "symbol": "BNC", }, - s { + a { "amount": 0n, "decimals": 12, "key": "aseed", "originSymbol": "aSEED", "symbol": "aSEED", }, - s { + a { "amount": 0n, "decimals": 18, "key": "astr", "originSymbol": "ASTR", "symbol": "ASTR", }, - s { + a { "amount": 0n, "decimals": 12, "key": "aca", "originSymbol": "ACA", "symbol": "ACA", }, - s { + a { "amount": 1330000000000000000n, "decimals": 18, "key": "glmr", @@ -605,148 +605,148 @@ exports[`sdk > getParachainBalances > should get expected balances for Moonbeam ] `; -exports[`sdk > getParachainBalances > should get expected balances for peaq 1`] = ` +exports[`sdk > getParachainBalances > on 'peaq Alphanet' for address: '5FtGz8bgoCQ6pNAYLWCfxKx9ekLnX1ewP9q2T…' > should get expected balances 1`] = ` +[ + a { + "amount": 0n, + "decimals": 18, + "key": "ftmwh", + "originSymbol": "FTM.wh", + "symbol": "FTM.wh", + }, + a { + "amount": 0n, + "decimals": 18, + "key": "dev", + "originSymbol": "DEV", + "symbol": "DEV", + }, + a { + "amount": 1223300000000000000n, + "decimals": 18, + "key": "agng", + "originSymbol": "AGNG", + "symbol": "AGNG", + }, +] +`; + +exports[`sdk > getParachainBalances > on 'peaq EVM Alphanet' for address: '0x4E82143Af671Cc8201Bc7efCBbCED3A69e8…' > should get expected balances 1`] = ` +[ + a { + "amount": 330000000000000000n, + "decimals": 18, + "key": "dev", + "originSymbol": "DEV", + "symbol": "DEV", + }, + a { + "amount": 123000000000000000n, + "decimals": 18, + "key": "ftmwh", + "originSymbol": "FTM.wh", + "symbol": "FTM.wh", + }, +] +`; + +exports[`sdk > getParachainBalances > on 'peaq EVM' for address: '0x4E82143Af671Cc8201Bc7efCBbCED3A69e8…' > should get expected balances 1`] = ` [ - s { + a { "amount": 0n, "decimals": 6, "key": "usdtwh", "originSymbol": "USDT.Wh", "symbol": "USDT.Wh", }, - s { + a { "amount": 0n, "decimals": 18, "key": "weth", "originSymbol": "WETH", "symbol": "WETH", }, - s { + a { "amount": 0n, "decimals": 8, "key": "wbtc", "originSymbol": "WBTC", "symbol": "WBTC", }, - s { + a { "amount": 0n, "decimals": 18, "key": "dai", "originSymbol": "DAI", "symbol": "DAI", }, - s { + a { "amount": 0n, "decimals": 6, "key": "usdcwh", "originSymbol": "USDC.Wh", "symbol": "USDC.Wh", }, - s { + a { "amount": 0n, "decimals": 18, "key": "glmr", "originSymbol": "GLMR", "symbol": "GLMR", }, - s { - "amount": 1313000000000000000n, - "decimals": 18, - "key": "peaq", - "originSymbol": "PEAQ", - "symbol": "PEAQ", - }, -] -`; - -exports[`sdk > getParachainBalances > should get expected balances for peaq Alphanet 1`] = ` -[ - s { - "amount": 0n, - "decimals": 18, - "key": "ftmwh", - "originSymbol": "FTM.wh", - "symbol": "FTM.wh", - }, - s { - "amount": 0n, - "decimals": 18, - "key": "dev", - "originSymbol": "DEV", - "symbol": "DEV", - }, - s { - "amount": 1223300000000000000n, - "decimals": 18, - "key": "agng", - "originSymbol": "AGNG", - "symbol": "AGNG", - }, ] `; -exports[`sdk > getParachainBalances > should get expected balances for peaq EVM 1`] = ` +exports[`sdk > getParachainBalances > on 'peaq' for address: '5FtGz8bgoCQ6pNAYLWCfxKx9ekLnX1ewP9q2T…' > should get expected balances 1`] = ` [ - s { + a { "amount": 0n, "decimals": 6, "key": "usdtwh", "originSymbol": "USDT.Wh", "symbol": "USDT.Wh", }, - s { + a { "amount": 0n, "decimals": 18, "key": "weth", "originSymbol": "WETH", "symbol": "WETH", }, - s { + a { "amount": 0n, "decimals": 8, "key": "wbtc", "originSymbol": "WBTC", "symbol": "WBTC", }, - s { + a { "amount": 0n, "decimals": 18, "key": "dai", "originSymbol": "DAI", "symbol": "DAI", }, - s { + a { "amount": 0n, "decimals": 6, "key": "usdcwh", "originSymbol": "USDC.Wh", "symbol": "USDC.Wh", }, - s { + a { "amount": 0n, "decimals": 18, "key": "glmr", "originSymbol": "GLMR", "symbol": "GLMR", }, -] -`; - -exports[`sdk > getParachainBalances > should get expected balances for peaq EVM Alphanet 1`] = ` -[ - s { - "amount": 330000000000000000n, - "decimals": 18, - "key": "dev", - "originSymbol": "DEV", - "symbol": "DEV", - }, - s { - "amount": 123000000000000000n, + a { + "amount": 1313000000000000000n, "decimals": 18, - "key": "ftmwh", - "originSymbol": "FTM.wh", - "symbol": "FTM.wh", + "key": "peaq", + "originSymbol": "PEAQ", + "symbol": "PEAQ", }, ] `; diff --git a/packages/sdk/tests/acceptance/sdk.test.ts b/packages/sdk/tests/acceptance/sdk.test.ts index a5783592..2af3410c 100644 --- a/packages/sdk/tests/acceptance/sdk.test.ts +++ b/packages/sdk/tests/acceptance/sdk.test.ts @@ -1,3 +1,4 @@ +/* eslint-disable sort-keys */ // eslint-disable-next-line import/no-extraneous-dependencies import { describe, expect, it } from 'vitest'; import { @@ -12,102 +13,47 @@ import { peaqEvm, peaqEvmAlphanet, } from '@moonbeam-network/xcm-config'; +import { AnyChain } from '@moonbeam-network/xcm-types'; import { getParachainBalances } from '../../src/sdk'; // E2E balance test wallet const hydraDXAddress = '7MR8Qxy9sJmN6bfHMggAtFY5DwLxfrssLuTnP5rmkpD92oPH'; -const centrifugeAddress = '4fAKSBMGVT9jt1jkuJvXgvMbmqV2BuspFWWEmdVeFj9yRudb'; const moonEvmAddress = '0x4E82143Af671Cc8201Bc7efCBbCED3A69e84405e'; const substrateAddress = '5FtGz8bgoCQ6pNAYLWCfxKx9ekLnX1ewP9q2TjMT2riu7sf9'; -const moonbaseBetaAddress = '0x4E82143Af671Cc8201Bc7efCBbCED3A69e84405e'; -const peaqSubstrateAccount = '5FtGz8bgoCQ6pNAYLWCfxKx9ekLnX1ewP9q2TjMT2riu7sf9'; + +const config: { chain: AnyChain; address: string }[] = [ + { chain: moonbeam, address: moonEvmAddress }, + { chain: hydraDX, address: hydraDXAddress }, + { chain: hydraDX, address: substrateAddress }, + { + chain: centrifuge, + address: '4fAKSBMGVT9jt1jkuJvXgvMbmqV2BuspFWWEmdVeFj9yRudb', + }, + { chain: centrifuge, address: substrateAddress }, + { chain: hydraDxAlphanet, address: hydraDXAddress }, + { chain: hydraDxAlphanet, address: substrateAddress }, + { + chain: moonbaseBeta, + address: '0x4E82143Af671Cc8201Bc7efCBbCED3A69e84405e', + }, + { chain: moonbaseAlpha, address: moonEvmAddress }, + { chain: peaqEvmAlphanet, address: moonEvmAddress }, + { chain: peaqAlphanet, address: substrateAddress }, + { chain: peaqChain, address: substrateAddress }, + { chain: peaqEvm, address: moonEvmAddress }, +]; describe('sdk', () => { describe(`${getParachainBalances.name}`, () => { - it(`should get expected balances for ${moonbeam.name}`, async () => { - const result = await getParachainBalances(moonbeam, moonEvmAddress); - - expect(result).toMatchSnapshot(); - }); - it(`should get expected balances for ${hydraDX.name}`, async () => { - const result = await getParachainBalances(hydraDX, hydraDXAddress); - - expect(result).toMatchSnapshot(); - }); - it(`should get expected balances for ${hydraDX.name} for substrate address`, async () => { - const result = await getParachainBalances(hydraDX, substrateAddress); - - expect(result).toMatchSnapshot(); - }); - it(`should get expected balances for ${centrifuge.name}`, async () => { - const result = await getParachainBalances(centrifuge, centrifugeAddress); - - expect(result).toMatchSnapshot(); - }); - it(`should get expected balances for ${centrifuge.name} for substrate address`, async () => { - const result = await getParachainBalances(centrifuge, substrateAddress); - - expect(result).toMatchSnapshot(); - }); - it(`should get expected balances for ${hydraDxAlphanet.name}`, async () => { - const result = await getParachainBalances( - hydraDxAlphanet, - hydraDXAddress, - ); - - expect(result).toMatchSnapshot(); - }); - it(`should get expected balances for ${hydraDxAlphanet.name} for substrate address`, async () => { - const result = await getParachainBalances( - hydraDxAlphanet, - substrateAddress, - ); - - expect(result).toMatchSnapshot(); - }); - it(`should get expected balances for ${moonbaseBeta.name}`, async () => { - const result = await getParachainBalances( - moonbaseBeta, - moonbaseBetaAddress, - ); - - expect(result).toMatchSnapshot(); - }); - it(`should get expected balances for ${moonbaseAlpha.name}`, async () => { - const result = await getParachainBalances(moonbaseAlpha, moonEvmAddress); - - expect(result).toMatchSnapshot(); - }); - - it(`should get expected balances for ${peaqEvmAlphanet.name}`, async () => { - const result = await getParachainBalances( - peaqEvmAlphanet, - moonEvmAddress, - ); - - expect(result).toMatchSnapshot(); - }); - it(`should get expected balances for ${peaqAlphanet.name}`, async () => { - const result = await getParachainBalances( - peaqAlphanet, - peaqSubstrateAccount, - ); - - expect(result).toMatchSnapshot(); - }); - it(`should get expected balances for ${peaqChain.name}`, async () => { - const result = await getParachainBalances( - peaqChain, - peaqSubstrateAccount, - ); - - expect(result).toMatchSnapshot(); - }); - it(`should get expected balances for ${peaqEvm.name}`, async () => { - const result = await getParachainBalances(peaqEvm, moonEvmAddress); - - expect(result).toMatchSnapshot(); - }); + describe.each(config)( + 'on $chain.name for address: $address', + ({ chain, address }) => { + it(`should get expected balances`, async () => { + const result = await getParachainBalances(chain, address); + expect(result).toMatchSnapshot(); + }); + }, + ); }); });