@paraspell/assets 10.0.1 → 10.1.0
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 +2 -3
- package/dist/index.mjs +2 -3
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -12128,8 +12128,6 @@ var findAsset = function findAsset(node, currency, destination) {
|
|
|
12128
12128
|
} else {
|
|
12129
12129
|
asset = findAssetById(otherAssets, currency.id);
|
|
12130
12130
|
}
|
|
12131
|
-
} else {
|
|
12132
|
-
throw new Error('Invalid currency input');
|
|
12133
12131
|
}
|
|
12134
12132
|
return asset !== null && asset !== void 0 ? asset : null;
|
|
12135
12133
|
};
|
|
@@ -12144,8 +12142,9 @@ var findAssetForNodeOrThrow = function findAssetForNodeOrThrow(node, currency, d
|
|
|
12144
12142
|
};
|
|
12145
12143
|
|
|
12146
12144
|
var findAssetOnDestOrThrow = function findAssetOnDestOrThrow(origin, destination, currency) {
|
|
12145
|
+
var isDotKsmBridge = origin === 'AssetHubPolkadot' && destination === 'AssetHubKusama' || origin === 'AssetHubKusama' && destination === 'AssetHubPolkadot';
|
|
12147
12146
|
var originAsset = findAssetForNodeOrThrow(origin, currency, destination);
|
|
12148
|
-
var assetByMultiLocation = originAsset.multiLocation ? findAsset(destination, {
|
|
12147
|
+
var assetByMultiLocation = !isDotKsmBridge && originAsset.multiLocation ? findAsset(destination, {
|
|
12149
12148
|
multilocation: originAsset.multiLocation
|
|
12150
12149
|
}, null) : null;
|
|
12151
12150
|
return assetByMultiLocation !== null && assetByMultiLocation !== void 0 ? assetByMultiLocation : findAssetForNodeOrThrow(destination, {
|
package/dist/index.mjs
CHANGED
|
@@ -12126,8 +12126,6 @@ var findAsset = function findAsset(node, currency, destination) {
|
|
|
12126
12126
|
} else {
|
|
12127
12127
|
asset = findAssetById(otherAssets, currency.id);
|
|
12128
12128
|
}
|
|
12129
|
-
} else {
|
|
12130
|
-
throw new Error('Invalid currency input');
|
|
12131
12129
|
}
|
|
12132
12130
|
return asset !== null && asset !== void 0 ? asset : null;
|
|
12133
12131
|
};
|
|
@@ -12142,8 +12140,9 @@ var findAssetForNodeOrThrow = function findAssetForNodeOrThrow(node, currency, d
|
|
|
12142
12140
|
};
|
|
12143
12141
|
|
|
12144
12142
|
var findAssetOnDestOrThrow = function findAssetOnDestOrThrow(origin, destination, currency) {
|
|
12143
|
+
var isDotKsmBridge = origin === 'AssetHubPolkadot' && destination === 'AssetHubKusama' || origin === 'AssetHubKusama' && destination === 'AssetHubPolkadot';
|
|
12145
12144
|
var originAsset = findAssetForNodeOrThrow(origin, currency, destination);
|
|
12146
|
-
var assetByMultiLocation = originAsset.multiLocation ? findAsset(destination, {
|
|
12145
|
+
var assetByMultiLocation = !isDotKsmBridge && originAsset.multiLocation ? findAsset(destination, {
|
|
12147
12146
|
multilocation: originAsset.multiLocation
|
|
12148
12147
|
}, null) : null;
|
|
12149
12148
|
return assetByMultiLocation !== null && assetByMultiLocation !== void 0 ? assetByMultiLocation : findAssetForNodeOrThrow(destination, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/assets",
|
|
3
|
-
"version": "10.0
|
|
3
|
+
"version": "10.1.0",
|
|
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": "10.0
|
|
26
|
+
"@paraspell/sdk-common": "10.1.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|