From e4a5794b785162d05b50975068e13d0a2e655504 Mon Sep 17 00:00:00 2001 From: loanMaster <48173550+loanMaster@users.noreply.github.com> Date: Sat, 17 Jun 2023 11:49:52 +0200 Subject: [PATCH] fix: issue 9127. teleport reactivated (#9529) * fix: issue 9127. teleport reactivated * fix: issue 9127. restricted xcm version to V1 and V2 * fix: issue 9127. using xcm V3 for asset teleport --- .../apps-config/src/endpoints/productionRelayKusama.ts | 2 +- packages/apps-routing/src/teleport.ts | 4 +--- packages/page-parachains/src/Teleport.tsx | 8 ++++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/apps-config/src/endpoints/productionRelayKusama.ts b/packages/apps-config/src/endpoints/productionRelayKusama.ts index d20b36d81b..597bc10ee3 100644 --- a/packages/apps-config/src/endpoints/productionRelayKusama.ts +++ b/packages/apps-config/src/endpoints/productionRelayKusama.ts @@ -817,7 +817,7 @@ export const prodParasKusamaCommon: EndpointOption[] = [ 'IBP-GeoDNS2': 'wss://sys.dotters.network/encointer-kusama', OnFinality: 'wss://encointer.api.onfinality.io/public-ws' }, - teleport: [-1], + teleport: [], // teleport is temporarily disabled until xcm V3 is supported text: 'Encointer Network', ui: { color: '#0000cc', diff --git a/packages/apps-routing/src/teleport.ts b/packages/apps-routing/src/teleport.ts index 70d7ecabfd..c164d4ee89 100644 --- a/packages/apps-routing/src/teleport.ts +++ b/packages/apps-routing/src/teleport.ts @@ -11,9 +11,7 @@ export default function create (t: TFunction): Route { Component: Modal, Modal, display: { - // TODO We need to move to XCM v3 at some point, until such time we disable - // this functionality (we really should have kept it until later versions) - isHidden: true, + isHidden: false, needsAccounts: true, needsApi: [ [ diff --git a/packages/page-parachains/src/Teleport.tsx b/packages/page-parachains/src/Teleport.tsx index 25092a3dd4..b943309de3 100644 --- a/packages/page-parachains/src/Teleport.tsx +++ b/packages/page-parachains/src/Teleport.tsx @@ -77,7 +77,7 @@ function Teleport ({ onClose }: Props): React.ReactElement | null { const params = useMemo( () => [ { - V1: isParaTeleport + V3: isParaTeleport ? { interior: 'Here', parents: 1 @@ -92,12 +92,12 @@ function Teleport ({ onClose }: Props): React.ReactElement | null { } }, { - V1: { + V3: { interior: { X1: { AccountId32: { id: api.createType('AccountId32', recipientId).toHex(), - network: 'Any' + network: null } } }, @@ -105,7 +105,7 @@ function Teleport ({ onClose }: Props): React.ReactElement | null { } }, { - V1: [{ + V3: [{ fun: { Fungible: amount },