@paraspell/assets 11.12.3 → 11.12.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -7793,29 +7793,6 @@ var AssetHubPolkadot = {
7793
7793
  },
7794
7794
  existentialDeposit: "1000000"
7795
7795
  },
7796
- {
7797
- assetId: "22222037",
7798
- symbol: "KSM",
7799
- decimals: 12,
7800
- location: {
7801
- parents: 1,
7802
- interior: {
7803
- X3: [
7804
- {
7805
- Parachain: 1000
7806
- },
7807
- {
7808
- PalletInstance: 50
7809
- },
7810
- {
7811
- GeneralIndex: 22222037
7812
- }
7813
- ]
7814
- }
7815
- },
7816
- existentialDeposit: "1000000000000",
7817
- alias: "KSM1"
7818
- },
7819
7796
  {
7820
7797
  assetId: "201",
7821
7798
  symbol: "WUD",
@@ -8311,8 +8288,7 @@ var AssetHubPolkadot = {
8311
8288
  }
8312
8289
  },
8313
8290
  existentialDeposit: "1000000000",
8314
- isFeeAsset: true,
8315
- alias: "KSM2"
8291
+ isFeeAsset: true
8316
8292
  },
8317
8293
  {
8318
8294
  symbol: "sUSDS",
@@ -12720,29 +12696,6 @@ var AssetHubKusama = {
12720
12696
  },
12721
12697
  existentialDeposit: "10000000000"
12722
12698
  },
12723
- {
12724
- assetId: "14",
12725
- symbol: "DOT",
12726
- decimals: 10,
12727
- location: {
12728
- parents: 1,
12729
- interior: {
12730
- X3: [
12731
- {
12732
- Parachain: 1000
12733
- },
12734
- {
12735
- PalletInstance: 50
12736
- },
12737
- {
12738
- GeneralIndex: 14
12739
- }
12740
- ]
12741
- }
12742
- },
12743
- existentialDeposit: "100000000",
12744
- alias: "DOT1"
12745
- },
12746
12699
  {
12747
12700
  assetId: "360",
12748
12701
  symbol: "uni",
@@ -13505,8 +13458,7 @@ var AssetHubKusama = {
13505
13458
  }
13506
13459
  },
13507
13460
  existentialDeposit: "10000000",
13508
- isFeeAsset: true,
13509
- alias: "DOT2"
13461
+ isFeeAsset: true
13510
13462
  },
13511
13463
  {
13512
13464
  symbol: "vKSM",
@@ -21285,7 +21237,20 @@ var findAssetInfoOrThrow = function findAssetInfoOrThrow(chain, currency, destin
21285
21237
  var findAssetInfoOnDest = function findAssetInfoOnDest(origin, destination, currency, originAsset) {
21286
21238
  var isBridge = sdkCommon.isSubstrateBridge(origin, destination);
21287
21239
  var resolvedOriginAsset = originAsset !== null && originAsset !== void 0 ? originAsset : findAssetInfoOrThrow(origin, currency, destination);
21288
- var assetByLocation = !isBridge && resolvedOriginAsset.location ? findAssetInfo(destination, {
21240
+ if (isBridge) {
21241
+ // Try native first
21242
+ var nativeMatch = findAssetInfo(destination, {
21243
+ symbol: Native(resolvedOriginAsset.symbol)
21244
+ }, null);
21245
+ if (nativeMatch) return nativeMatch;
21246
+ // Then try foreign
21247
+ var foreignMatch = findAssetInfo(destination, {
21248
+ symbol: Foreign(resolvedOriginAsset.symbol)
21249
+ }, null);
21250
+ if (foreignMatch) return foreignMatch;
21251
+ return null;
21252
+ }
21253
+ var assetByLocation = resolvedOriginAsset.location ? findAssetInfo(destination, {
21289
21254
  location: resolvedOriginAsset.location
21290
21255
  }, null) : null;
21291
21256
  return assetByLocation !== null && assetByLocation !== void 0 ? assetByLocation : findAssetInfo(destination, {
package/dist/index.mjs CHANGED
@@ -7791,29 +7791,6 @@ var AssetHubPolkadot = {
7791
7791
  },
7792
7792
  existentialDeposit: "1000000"
7793
7793
  },
7794
- {
7795
- assetId: "22222037",
7796
- symbol: "KSM",
7797
- decimals: 12,
7798
- location: {
7799
- parents: 1,
7800
- interior: {
7801
- X3: [
7802
- {
7803
- Parachain: 1000
7804
- },
7805
- {
7806
- PalletInstance: 50
7807
- },
7808
- {
7809
- GeneralIndex: 22222037
7810
- }
7811
- ]
7812
- }
7813
- },
7814
- existentialDeposit: "1000000000000",
7815
- alias: "KSM1"
7816
- },
7817
7794
  {
7818
7795
  assetId: "201",
7819
7796
  symbol: "WUD",
@@ -8309,8 +8286,7 @@ var AssetHubPolkadot = {
8309
8286
  }
8310
8287
  },
8311
8288
  existentialDeposit: "1000000000",
8312
- isFeeAsset: true,
8313
- alias: "KSM2"
8289
+ isFeeAsset: true
8314
8290
  },
8315
8291
  {
8316
8292
  symbol: "sUSDS",
@@ -12718,29 +12694,6 @@ var AssetHubKusama = {
12718
12694
  },
12719
12695
  existentialDeposit: "10000000000"
12720
12696
  },
12721
- {
12722
- assetId: "14",
12723
- symbol: "DOT",
12724
- decimals: 10,
12725
- location: {
12726
- parents: 1,
12727
- interior: {
12728
- X3: [
12729
- {
12730
- Parachain: 1000
12731
- },
12732
- {
12733
- PalletInstance: 50
12734
- },
12735
- {
12736
- GeneralIndex: 14
12737
- }
12738
- ]
12739
- }
12740
- },
12741
- existentialDeposit: "100000000",
12742
- alias: "DOT1"
12743
- },
12744
12697
  {
12745
12698
  assetId: "360",
12746
12699
  symbol: "uni",
@@ -13503,8 +13456,7 @@ var AssetHubKusama = {
13503
13456
  }
13504
13457
  },
13505
13458
  existentialDeposit: "10000000",
13506
- isFeeAsset: true,
13507
- alias: "DOT2"
13459
+ isFeeAsset: true
13508
13460
  },
13509
13461
  {
13510
13462
  symbol: "vKSM",
@@ -21283,7 +21235,20 @@ var findAssetInfoOrThrow = function findAssetInfoOrThrow(chain, currency, destin
21283
21235
  var findAssetInfoOnDest = function findAssetInfoOnDest(origin, destination, currency, originAsset) {
21284
21236
  var isBridge = isSubstrateBridge(origin, destination);
21285
21237
  var resolvedOriginAsset = originAsset !== null && originAsset !== void 0 ? originAsset : findAssetInfoOrThrow(origin, currency, destination);
21286
- var assetByLocation = !isBridge && resolvedOriginAsset.location ? findAssetInfo(destination, {
21238
+ if (isBridge) {
21239
+ // Try native first
21240
+ var nativeMatch = findAssetInfo(destination, {
21241
+ symbol: Native(resolvedOriginAsset.symbol)
21242
+ }, null);
21243
+ if (nativeMatch) return nativeMatch;
21244
+ // Then try foreign
21245
+ var foreignMatch = findAssetInfo(destination, {
21246
+ symbol: Foreign(resolvedOriginAsset.symbol)
21247
+ }, null);
21248
+ if (foreignMatch) return foreignMatch;
21249
+ return null;
21250
+ }
21251
+ var assetByLocation = resolvedOriginAsset.location ? findAssetInfo(destination, {
21287
21252
  location: resolvedOriginAsset.location
21288
21253
  }, null) : null;
21289
21254
  return assetByLocation !== null && assetByLocation !== void 0 ? assetByLocation : findAssetInfo(destination, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/assets",
3
- "version": "11.12.3",
3
+ "version": "11.12.4",
4
4
  "description": "Assets for ParaSpell XCM/XCMP tool for developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,7 +23,7 @@
23
23
  "dist"
24
24
  ],
25
25
  "dependencies": {
26
- "@paraspell/sdk-common": "11.12.3"
26
+ "@paraspell/sdk-common": "11.12.4"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@babel/plugin-syntax-import-attributes": "^7.27.1",