From dd750a0160a04fb3c879a5481ad45ecceee9b826 Mon Sep 17 00:00:00 2001 From: Richard Kenigs Date: Mon, 18 Mar 2024 14:49:16 +0100 Subject: [PATCH] add HydraDX alphanet e2e test --- .../acceptance/__snapshots__/sdk.test.ts.snap | 33 +++++++++++++++++++ packages/sdk/tests/acceptance/sdk.test.ts | 16 ++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap b/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap index 658f284f..9d3c4f91 100644 --- a/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap +++ b/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap @@ -66,6 +66,39 @@ exports[`sdk getParachainBalances should get expected balances for HydraDX 1`] = ] `; +exports[`sdk getParachainBalances should get expected balances for HydraDX Alphanet 1`] = ` +[ + r { + "amount": 0n, + "decimals": 18, + "key": "ftmwh", + "originSymbol": "FTM.wh", + "symbol": "FTM.wh", + }, + r { + "amount": 0n, + "decimals": 6, + "key": "usdcwh", + "originSymbol": "USDC.Wh", + "symbol": "USDC.Wh", + }, + r { + "amount": 0n, + "decimals": 18, + "key": "dev", + "originSymbol": "DEV", + "symbol": "DEV", + }, + r { + "amount": 0n, + "decimals": 12, + "key": "hdx", + "originSymbol": "HDX", + "symbol": "HDX", + }, +] +`; + exports[`sdk getParachainBalances should get expected balances for Moonbeam 1`] = ` [ r { diff --git a/packages/sdk/tests/acceptance/sdk.test.ts b/packages/sdk/tests/acceptance/sdk.test.ts index 80e28c5d..aff6f659 100644 --- a/packages/sdk/tests/acceptance/sdk.test.ts +++ b/packages/sdk/tests/acceptance/sdk.test.ts @@ -1,5 +1,10 @@ /* eslint-disable jest/no-commented-out-tests */ -import { centrifuge, hydraDX, moonbeam } from '@moonbeam-network/xcm-config'; +import { + centrifuge, + hydraDX, + hydraDxAlphanet, + moonbeam, +} from '@moonbeam-network/xcm-config'; import { getParachainBalances } from '../../src/sdk'; // E2E balance test wallet @@ -24,6 +29,15 @@ describe('sdk', () => { expect(result).toMatchSnapshot(); }); + + it(`should get expected balances for ${hydraDxAlphanet.name}`, async () => { + const result = await getParachainBalances( + hydraDxAlphanet, + hydraDXAddress, + ); + + expect(result).toMatchSnapshot(); + }); }); });