@paraspell/swap 13.6.0 → 13.7.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.
Files changed (2) hide show
  1. package/dist/index.mjs +4 -4
  2. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createChainClient as createChainClient$1, registerSwapExtension } from '@paraspell/sdk';
2
- import { UnsupportedOperationError, assertCurrencyCore, dryRun, getFailureInfo, DryRunFailedError, isConfig, getNativeAssets, RoutingResolutionError, findAssetInfoById, getOtherAssets, getChainProviders, parseUnits, getNativeAssetSymbol, padValueBy, formatUnits as formatUnits$1, AmountTooLowError, getBalance, localizeLocation, getAssets, Parents, isSymbolMatch, getParaId, UnableToComputeError, getAssetDecimals, findNativeAssetInfoOrThrow, InvalidCurrencyError, findAssetInfoOrThrow, isOverrideLocationSpecifier, isSymbolSpecifier, findBestMatches, findAssetInfoBySymbol, findAssetInfoByLoc, deepEqual, normalizeExchange, EXCHANGE_CHAINS, reverseTransformLocation, getAssetsImpl, isAssetEqual, isExternalChain, isSystemAsset, TransferToAhNotSupported, ScenarioNotSupportedError, applyDecimalAbstraction, findAssetInfo, getRelayChainOf, hasSupportForAsset, Builder, isChainEvm, convertBuilderConfig, handleSwapExecuteTransfer, getXcmFee, getOriginXcmFee as getOriginXcmFee$1, InvalidAddressError, MissingParameterError, BatchMode, createChainClient as createChainClient$2, getExistentialDepositOrThrow, buildHopInfo, getRelayChainSymbol, aggregateHopFees, buildDestInfo, buildOriginInfo } from '@paraspell/sdk-core';
2
+ import { UnsupportedOperationError, assertCurrencyCore, dryRun, getFailureInfo, DryRunFailedError, isConfig, getNativeAssets, RoutingResolutionError, findAssetInfoById, getOtherAssets, getChainProviders, parseUnits, getNativeAssetSymbol, padValueBy, formatUnits as formatUnits$1, AmountTooLowError, getBalance, localizeLocation, getAssets, Parents, isSymbolMatch, getParaId, UnableToComputeError, getAssetDecimals, findNativeAssetInfoOrThrow, InvalidCurrencyError, findAssetInfoOrThrow, isOverrideLocationSpecifier, findAssetInfoByLoc, isSymbolSpecifier, findBestMatches, findAssetInfoBySymbol, deepEqual, normalizeExchange, EXCHANGE_CHAINS, reverseTransformLocation, getAssetsImpl, isAssetEqual, isExternalChain, isSystemAsset, TransferToAhNotSupported, ScenarioNotSupportedError, applyDecimalAbstraction, findAssetInfo, getRelayChainOf, hasSupportForAsset, Builder, isChainEvm, convertBuilderConfig, handleSwapExecuteTransfer, getXcmFee, getOriginXcmFee as getOriginXcmFee$1, InvalidAddressError, MissingParameterError, BatchMode, createChainClient as createChainClient$2, getExistentialDepositOrThrow, buildHopInfo, getRelayChainSymbol, aggregateHopFees, buildDestInfo, buildOriginInfo } from '@paraspell/sdk-core';
3
3
  import { toHex } from 'polkadot-api/utils';
4
4
  import 'polkadot-api';
5
5
  import { Wallet } from '@acala-network/sdk';
@@ -9653,7 +9653,9 @@ var getExchangeAsset = function getExchangeAsset(exchange, currency) {
9653
9653
  return !asset.isNative;
9654
9654
  });
9655
9655
  var asset;
9656
- if ('symbol' in currency) {
9656
+ if ('location' in currency && !isOverrideLocationSpecifier(currency.location)) {
9657
+ asset = findAssetInfoByLoc(assets, currency.location);
9658
+ } else if ('symbol' in currency) {
9657
9659
  if (!isSymbolSpecifier(currency.symbol)) {
9658
9660
  var matches = findBestMatches(assets, currency.symbol);
9659
9661
  if (matches.length > 1 && throwOnDuplicateSymbol) {
@@ -9661,8 +9663,6 @@ var getExchangeAsset = function getExchangeAsset(exchange, currency) {
9661
9663
  }
9662
9664
  }
9663
9665
  asset = findAssetInfoBySymbol(otherAssets, nativeAssets, currency.symbol);
9664
- } else if ('location' in currency && !isOverrideLocationSpecifier(currency.location)) {
9665
- asset = findAssetInfoByLoc(assets, currency.location);
9666
9666
  } else if ('id' in currency) {
9667
9667
  asset = findAssetInfoById(otherAssets, currency.id);
9668
9668
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/swap",
3
- "version": "13.6.0",
3
+ "version": "13.7.0",
4
4
  "description": "Tool for XCM cross-chain asset exchanging across Polkadot and Kusama ecosystems",
5
5
  "type": "module",
6
6
  "exports": {
@@ -50,9 +50,9 @@
50
50
  "postcss": "^8.5.15",
51
51
  "react": "^19.2.6",
52
52
  "rxjs": "^7.8.2",
53
- "@paraspell/sdk": "13.6.0",
54
- "@paraspell/sdk-pjs": "13.6.0",
55
- "@paraspell/sdk-core": "13.6.0"
53
+ "@paraspell/sdk": "13.7.0",
54
+ "@paraspell/sdk-core": "13.7.0",
55
+ "@paraspell/sdk-pjs": "13.7.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@babel/core": "^7.29.7",