From 632a76792651a4945bda994c7dae389f8eb331e5 Mon Sep 17 00:00:00 2001 From: derpy-duck <115193320+derpy-duck@users.noreply.github.com> Date: Mon, 26 Jun 2023 11:51:57 -0400 Subject: [PATCH] bugfix in test for Testnet and Mainnet (#3123) --- sdk/js/src/relayer/__tests__/wormhole_relayer.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sdk/js/src/relayer/__tests__/wormhole_relayer.ts b/sdk/js/src/relayer/__tests__/wormhole_relayer.ts index 67589e8d70..7a6b269260 100644 --- a/sdk/js/src/relayer/__tests__/wormhole_relayer.ts +++ b/sdk/js/src/relayer/__tests__/wormhole_relayer.ts @@ -107,6 +107,11 @@ const optionalParams = { sourceChainProvider: source.provider, targetChainProviders: myMap, }; +const optionalParamsTarget = { + environment: network, + sourceChainProvider: target.provider, + targetChainProviders: myMap, +}; // for signing wormhole messages const guardians = new MockGuardians(GUARDIAN_SET_INDEX, GUARDIAN_KEYS); @@ -171,7 +176,7 @@ const testForward = async ( targetChain, sourceChain, notEnoughExtraForwardingValue ? TOO_LOW_GAS_LIMIT : REASONABLE_GAS_LIMIT, - optionalParams + optionalParamsTarget ); const value = await relayer.getPrice( sourceChain, @@ -291,13 +296,13 @@ describe("Wormhole Relayer Tests", () => { targetChain, sourceChain, REASONABLE_GAS_LIMIT, - optionalParams + optionalParamsTarget ); const valueNeededOnTargetChain2 = await relayer.getPrice( targetChain, targetChain, REASONABLE_GAS_LIMIT, - optionalParams + optionalParamsTarget ); const value = await relayer.getPrice(