From 3f863e11a52dfb4183d0e470fa2f4c6b742fee78 Mon Sep 17 00:00:00 2001 From: Mario J Maurello Date: Fri, 4 Oct 2024 17:54:58 +0200 Subject: [PATCH] revert deconstructing not needed --- .../extrinsic/polkadotXcm/polkadotXcm.ts | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/packages/builder/src/mrl/providers/wormhole/extrinsic/polkadotXcm/polkadotXcm.ts b/packages/builder/src/mrl/providers/wormhole/extrinsic/polkadotXcm/polkadotXcm.ts index 785a2a2f..a32a9751 100644 --- a/packages/builder/src/mrl/providers/wormhole/extrinsic/polkadotXcm/polkadotXcm.ts +++ b/packages/builder/src/mrl/providers/wormhole/extrinsic/polkadotXcm/polkadotXcm.ts @@ -2,10 +2,8 @@ import { type AnyParachain, AssetAmount } from '@moonbeam-network/xcm-types'; import { getMultilocationDerivedAddresses } from '@moonbeam-network/xcm-utils'; import { ExtrinsicBuilder } from '../../../../../extrinsic/ExtrinsicBuilder'; import { ExtrinsicConfig } from '../../../../../types/substrate/ExtrinsicConfig'; -import { MrlBuilder } from '../../../../MrlBuilder'; import { Provider } from '../../../../MrlBuilder.constants'; import type { MrlConfigBuilder } from '../../../../MrlBuilder.interfaces'; -import type { WormholeConfig } from '../../wormhole'; // TODO: Can we move them somewhere? const BUY_EXECUTION_FEE = 100_000_000_000_000_000n; @@ -15,20 +13,18 @@ export function polkadotXcm() { return { send: (): MrlConfigBuilder => ({ provider: Provider.WORMHOLE, - build: (params) => { - const { - asset, - destination, - fee, - moonAsset, - moonChain, - moonApi, - source, - sourceAddress, - sourceApi, - transact, - } = params; - + build: ({ + asset, + destination, + fee, + moonAsset, + moonChain, + moonApi, + source, + sourceAddress, + sourceApi, + transact, + }) => { if (!destination.wh?.name) { throw new Error('Destination chain does not have a wormhole name'); }