diff --git a/package.json b/package.json index 3ad9df9..f8addba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pezkuwi-telegram-miniapp", - "version": "1.0.161", + "version": "1.0.162", "type": "module", "description": "Pezkuwichain Telegram Mini App - Forum, Announcements, Rewards", "author": "Pezkuwichain Team", diff --git a/src/components/wallet/FundFeesModal.tsx b/src/components/wallet/FundFeesModal.tsx index 505ec70..422f11c 100644 --- a/src/components/wallet/FundFeesModal.tsx +++ b/src/components/wallet/FundFeesModal.tsx @@ -218,6 +218,9 @@ export function FundFeesModal({ isOpen, onClose }: Props) { // eslint-disable-next-line @typescript-eslint/no-explicit-any let assets: any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let feeAssetId: any; + if (direction === 'to-parachain') { // Relay Chain → Teyrchain const targetTeyrchainId = selectedChain.teyrchainId; @@ -236,7 +239,7 @@ export function FundFeesModal({ isOpen, onClose }: Props) { parents: 0, interior: { X1: { - AccountId32: { + accountid32: { network: null, id: sourceApi.createType('AccountId32', address).toHex(), }, @@ -261,8 +264,18 @@ export function FundFeesModal({ isOpen, onClose }: Props) { }, ], }; + + // Fee asset: Native HEZ on relay + feeAssetId = { + V3: { + Concrete: { + parents: 0, + interior: 'Here', + }, + }, + }; } else { - // Parachain → Relay Chain + // Teyrchain → Relay Chain dest = { V3: { parents: 1, @@ -275,7 +288,7 @@ export function FundFeesModal({ isOpen, onClose }: Props) { parents: 0, interior: { X1: { - AccountId32: { + accountid32: { network: null, id: sourceApi.createType('AccountId32', address).toHex(), }, @@ -284,7 +297,7 @@ export function FundFeesModal({ isOpen, onClose }: Props) { }, }; - // Native token from parachain's perspective (parent chain's token) + // Native token from teyrchain's perspective (parent chain's token) assets = { V3: [ { @@ -300,31 +313,28 @@ export function FundFeesModal({ isOpen, onClose }: Props) { }, ], }; + + // Fee asset: Parent chain's native token + feeAssetId = { + V3: { + Concrete: { + parents: 1, + interior: 'Here', + }, + }, + }; } const weightLimit = 'Unlimited'; - // Create teleport transaction using polkadotXcm pallet on parachains - // eslint-disable-next-line @typescript-eslint/no-explicit-any - let tx: any; - if (direction === 'to-parachain') { - tx = sourceApi.tx.xcmPallet.limitedTeleportAssets( - dest, - beneficiary, - assets, - 0, - weightLimit - ); - } else { - // Parachains use polkadotXcm pallet - tx = sourceApi.tx.polkadotXcm.limitedTeleportAssets( - dest, - beneficiary, - assets, - 0, - weightLimit - ); - } + // Create teleport transaction - xcmPallet is used on all Pezkuwi chains + const tx = sourceApi.tx.xcmPallet.limitedTeleportAssets( + dest, + beneficiary, + assets, + feeAssetId, + weightLimit + ); setTxStatus('pending'); diff --git a/src/version.json b/src/version.json index 8ffa32c..436884b 100644 --- a/src/version.json +++ b/src/version.json @@ -1,5 +1,5 @@ { - "version": "1.0.161", - "buildTime": "2026-02-07T19:28:12.310Z", - "buildNumber": 1770492492311 + "version": "1.0.162", + "buildTime": "2026-02-07T19:35:44.402Z", + "buildNumber": 1770492944403 }