mirror of
https://github.com/pezkuwichain/pezkuwi-telegram-miniapp.git
synced 2026-04-22 03:07:55 +00:00
debug: detect available XCM pallet on chain
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pezkuwi-telegram-miniapp",
|
||||
"version": "1.0.162",
|
||||
"version": "1.0.164",
|
||||
"type": "module",
|
||||
"description": "Pezkuwichain Telegram Mini App - Forum, Announcements, Rewards",
|
||||
"author": "Pezkuwichain Team",
|
||||
|
||||
@@ -327,8 +327,15 @@ export function FundFeesModal({ isOpen, onClose }: Props) {
|
||||
|
||||
const weightLimit = 'Unlimited';
|
||||
|
||||
// Create teleport transaction - xcmPallet is used on all Pezkuwi chains
|
||||
const tx = sourceApi.tx.xcmPallet.limitedTeleportAssets(
|
||||
// Find which XCM pallet exists on this chain
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const xcmPallet = (sourceApi.tx as any).xcmPallet || (sourceApi.tx as any).polkadotXcm;
|
||||
if (!xcmPallet?.limitedTeleportAssets) {
|
||||
const available = Object.keys(sourceApi.tx).filter((p) => p.toLowerCase().includes('xcm'));
|
||||
throw new Error(`XCM pallet nehate dîtin. Heyî: ${available.join(', ') || 'tune'}`);
|
||||
}
|
||||
|
||||
const tx = xcmPallet.limitedTeleportAssets(
|
||||
dest,
|
||||
beneficiary,
|
||||
assets,
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.0.162",
|
||||
"buildTime": "2026-02-07T19:35:44.402Z",
|
||||
"buildNumber": 1770492944403
|
||||
"version": "1.0.164",
|
||||
"buildTime": "2026-02-07T19:46:55.715Z",
|
||||
"buildNumber": 1770493615716
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user