From 3dae346348a2241141707e14870c80c8254e28b7 Mon Sep 17 00:00:00 2001 From: qwer951123 Date: Sat, 11 May 2024 10:56:27 +0800 Subject: [PATCH] fix: fix message format (#129) --- package.json | 2 +- src/utils/xtokens-params.ts | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 7a94603..1ffc416 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@polkawallet/bridge", - "version": "0.1.7-0", + "version": "0.1.7-1", "description": "polkawallet bridge sdk", "main": "index.js", "types": "index.d.ts", diff --git a/src/utils/xtokens-params.ts b/src/utils/xtokens-params.ts index e96a5ee..1154905 100644 --- a/src/utils/xtokens-params.ts +++ b/src/utils/xtokens-params.ts @@ -115,6 +115,26 @@ export function createXTokensAssetsParam( }; } + if (version === "V4") { + return { + V4: { + fun: { + Fungible: amount, + }, + id: { + parents: 1, + interior: { + X3: [ + { Parachain: paraChainId }, + { PalletInstance: 50 }, + { GeneralIndex: assetId }, + ], + }, + }, + }, + }; + } + return { [version]: { fun: {