@paraspell/sdk-core 11.8.2 → 11.8.3

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
@@ -838,8 +838,8 @@ var computeOverridenAmount = function computeOverridenAmount(options, increaseAm
838
838
  api = options.api;
839
839
  var amount = options.currency.amount;
840
840
  var config = api.getConfig();
841
- if (isConfig(config) && config.abstractDecimals) {
842
- return BigInt(increaseAmount) + BigInt(amount);
841
+ if (isConfig(config) && config.abstractDecimals && typeof amount !== 'bigint') {
842
+ return Number(increaseAmount) + Number(amount);
843
843
  } else {
844
844
  assertToIsString(to);
845
845
  var asset = assets.findAssetInfoOrThrow(from, currency, to);
@@ -4481,13 +4481,13 @@ var getDestXcmFee = /*#__PURE__*/function () {
4481
4481
  case 1:
4482
4482
  _fee = _context3.v;
4483
4483
  _context3.n = 2;
4484
- return isSufficientDestination(api, destination, address, BigInt(currency.amount), asset, _fee);
4484
+ return isSufficientDestination(api, destination, address, currency.amount, asset, _fee);
4485
4485
  case 2:
4486
4486
  sufficient = _context3.v;
4487
4487
  return _context3.a(2, {
4488
4488
  fee: _fee,
4489
4489
  feeType: 'paymentInfo',
4490
- sufficient: !assets.hasDryRunSupport(destination) ? sufficient : false
4490
+ sufficient: sufficient
4491
4491
  });
4492
4492
  case 3:
4493
4493
  _context3.n = 4;
@@ -4500,7 +4500,7 @@ var getDestXcmFee = /*#__PURE__*/function () {
4500
4500
  asset: asset,
4501
4501
  originFee: originFee,
4502
4502
  feeAsset: resolvedFeeAsset,
4503
- amount: BigInt(currency.amount) < 2n ? 2n : BigInt(currency.amount)
4503
+ amount: currency.amount < 2n ? 2n : currency.amount
4504
4504
  });
4505
4505
  case 4:
4506
4506
  dryRunResult = _context3.v;
@@ -5787,6 +5787,10 @@ var handleSwapExecuteTransfer = /*#__PURE__*/function () {
5787
5787
  // First dry run with dummy fees to extract actual fees
5788
5788
  _context3.n = 2;
5789
5789
  return createXcmAndCall(_objectSpread2(_objectSpread2({}, internalOptions), {}, {
5790
+ assetInfoTo: _objectSpread2(_objectSpread2({}, assetTo), {}, {
5791
+ // Use half of the amountOut in initial dryRun to prevent NoDeal error in dry run
5792
+ amount: assetTo.amount / 2n
5793
+ }),
5790
5794
  fees: fees
5791
5795
  }));
5792
5796
  case 2:
@@ -11254,7 +11258,7 @@ var getXcmFeeEstimate = /*#__PURE__*/function () {
11254
11258
  case 3:
11255
11259
  originSufficient = _context.v;
11256
11260
  _context.n = 4;
11257
- return isSufficientDestination(destApi, destination, address, BigInt(currency.amount), originAsset, fixedDestinationFee);
11261
+ return isSufficientDestination(destApi, destination, address, currency.amount, originAsset, fixedDestinationFee);
11258
11262
  case 4:
11259
11263
  _destinationSufficient = _context.v;
11260
11264
  return _context.a(2, {
package/dist/index.d.ts CHANGED
@@ -2190,7 +2190,7 @@ declare const maybeOverrideAsset: (version: Version, amount: bigint, asset: TAss
2190
2190
 
2191
2191
  declare const sortAssets: (assets: TAsset[]) => TAsset[];
2192
2192
 
2193
- declare const computeOverridenAmount: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, increaseAmount: string) => bigint;
2193
+ declare const computeOverridenAmount: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, increaseAmount: string) => number | bigint;
2194
2194
  declare const overrideTxAmount: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, builder: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>, amount: string) => Promise<TRes>;
2195
2195
  declare const createTx: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, builder: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>, amount: string | undefined) => Promise<TRes>;
2196
2196
 
package/dist/index.mjs CHANGED
@@ -839,8 +839,8 @@ var computeOverridenAmount = function computeOverridenAmount(options, increaseAm
839
839
  api = options.api;
840
840
  var amount = options.currency.amount;
841
841
  var config = api.getConfig();
842
- if (isConfig(config) && config.abstractDecimals) {
843
- return BigInt(increaseAmount) + BigInt(amount);
842
+ if (isConfig(config) && config.abstractDecimals && typeof amount !== 'bigint') {
843
+ return Number(increaseAmount) + Number(amount);
844
844
  } else {
845
845
  assertToIsString(to);
846
846
  var asset = findAssetInfoOrThrow(from, currency, to);
@@ -4482,13 +4482,13 @@ var getDestXcmFee = /*#__PURE__*/function () {
4482
4482
  case 1:
4483
4483
  _fee = _context3.v;
4484
4484
  _context3.n = 2;
4485
- return isSufficientDestination(api, destination, address, BigInt(currency.amount), asset, _fee);
4485
+ return isSufficientDestination(api, destination, address, currency.amount, asset, _fee);
4486
4486
  case 2:
4487
4487
  sufficient = _context3.v;
4488
4488
  return _context3.a(2, {
4489
4489
  fee: _fee,
4490
4490
  feeType: 'paymentInfo',
4491
- sufficient: !hasDryRunSupport(destination) ? sufficient : false
4491
+ sufficient: sufficient
4492
4492
  });
4493
4493
  case 3:
4494
4494
  _context3.n = 4;
@@ -4501,7 +4501,7 @@ var getDestXcmFee = /*#__PURE__*/function () {
4501
4501
  asset: asset,
4502
4502
  originFee: originFee,
4503
4503
  feeAsset: resolvedFeeAsset,
4504
- amount: BigInt(currency.amount) < 2n ? 2n : BigInt(currency.amount)
4504
+ amount: currency.amount < 2n ? 2n : currency.amount
4505
4505
  });
4506
4506
  case 4:
4507
4507
  dryRunResult = _context3.v;
@@ -5788,6 +5788,10 @@ var handleSwapExecuteTransfer = /*#__PURE__*/function () {
5788
5788
  // First dry run with dummy fees to extract actual fees
5789
5789
  _context3.n = 2;
5790
5790
  return createXcmAndCall(_objectSpread2(_objectSpread2({}, internalOptions), {}, {
5791
+ assetInfoTo: _objectSpread2(_objectSpread2({}, assetTo), {}, {
5792
+ // Use half of the amountOut in initial dryRun to prevent NoDeal error in dry run
5793
+ amount: assetTo.amount / 2n
5794
+ }),
5791
5795
  fees: fees
5792
5796
  }));
5793
5797
  case 2:
@@ -11255,7 +11259,7 @@ var getXcmFeeEstimate = /*#__PURE__*/function () {
11255
11259
  case 3:
11256
11260
  originSufficient = _context.v;
11257
11261
  _context.n = 4;
11258
- return isSufficientDestination(destApi, destination, address, BigInt(currency.amount), originAsset, fixedDestinationFee);
11262
+ return isSufficientDestination(destApi, destination, address, currency.amount, originAsset, fixedDestinationFee);
11259
11263
  case 4:
11260
11264
  _destinationSufficient = _context.v;
11261
11265
  return _context.a(2, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk-core",
3
- "version": "11.8.2",
3
+ "version": "11.8.3",
4
4
  "description": "SDK core for ParaSpell XCM/XCMP tool for developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,9 +26,9 @@
26
26
  "@noble/hashes": "^1.8.0",
27
27
  "@scure/base": "^2.0.0",
28
28
  "viem": "^2.36.0",
29
- "@paraspell/assets": "11.8.2",
30
- "@paraspell/pallets": "11.8.2",
31
- "@paraspell/sdk-common": "11.8.2"
29
+ "@paraspell/assets": "11.8.3",
30
+ "@paraspell/sdk-common": "11.8.3",
31
+ "@paraspell/pallets": "11.8.3"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@babel/plugin-syntax-import-attributes": "^7.27.1",