@paraspell/sdk-dedot 14.3.0 → 14.3.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.
Files changed (2) hide show
  1. package/dist/index.mjs +10 -3
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { getEvmPrivateKeyHex, getNativeAssetSymbol, getOtherAssets, NumberFormatError, createClientCache, MAX_CLIENTS, EXTENSION_MS, createClientPoolHelpers, BatchMode, isConfig, isCustomChain, isSenderSigner, PolkadotApi, UnsupportedOperationError, buildDryRunError, resolveModuleError, RuntimeApiUnavailableError, wrapTxBypass, localizeLocation, createAssetId, addXcmVersionHeader, isAssetEqual, RELAY_LOCATION, replaceBigInt, createChainClient as createChainClient$1, getBalance as getBalance$1, Foreign, ForeignAbstract, Native, findAssetInfo, getAllAssetsSymbols, getAssets, getAssetsObject, getExistentialDeposit, getNativeAssets, getRelayChainSymbol, getSupportedAssets, getTChain, isChainEvm, convertSs58 as convertSs58$1, Builder as Builder$1, getBridgeStatus as getBridgeStatus$1, getParaEthTransferFees as getParaEthTransferFees$1, DRY_RUN_CLIENT_TIMEOUT_MS, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$1 } from '@paraspell/sdk-core';
1
+ import { getEvmPrivateKeyHex, getNativeAssetSymbol, getOtherAssets, NumberFormatError, createClientCache, MAX_CLIENTS, EXTENSION_MS, createClientPoolHelpers, BatchMode, isConfig, isCustomChain, isSenderSigner, PolkadotApi, UnsupportedOperationError, buildDryRunError, resolveModuleError, RuntimeApiUnavailableError, wrapTxBypass, localizeLocation, createAssetId, addXcmVersionHeader, isAssetEqual, RELAY_LOCATION, SubmitTransactionError, replaceBigInt, createChainClient as createChainClient$1, getBalance as getBalance$1, Foreign, ForeignAbstract, Native, findAssetInfo, getAllAssetsSymbols, getAssets, getAssetsObject, getExistentialDeposit, getNativeAssets, getRelayChainSymbol, getSupportedAssets, getTChain, isChainEvm, convertSs58 as convertSs58$1, Builder as Builder$1, getBridgeStatus as getBridgeStatus$1, getParaEthTransferFees as getParaEthTransferFees$1, DRY_RUN_CLIENT_TIMEOUT_MS, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$1 } from '@paraspell/sdk-core';
2
2
  export * from '@paraspell/sdk-core';
3
3
  import { stringPascalCase, isEvmAddress, decodeAddress, isHex, u8aToHex, hexToU8a, stringToU8a, blake2AsHex } from 'dedot/utils';
4
4
  import { ParaSpellError, snakeToCamel, lowercaseFirstLetter } from '@paraspell/sdk-common';
@@ -1745,7 +1745,7 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1745
1745
  key: "signAndSubmitFinalized",
1746
1746
  value: function () {
1747
1747
  var _signAndSubmitFinalized = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee15(tx, sender) {
1748
- var account, result;
1748
+ var account, result, meta;
1749
1749
  return _regenerator().w(function (_context15) {
1750
1750
  while (1) switch (_context15.n) {
1751
1751
  case 0:
@@ -1754,9 +1754,16 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1754
1754
  return tx.signAndSend(account).untilFinalized();
1755
1755
  case 1:
1756
1756
  result = _context15.v;
1757
+ if (!result.dispatchError) {
1758
+ _context15.n = 2;
1759
+ break;
1760
+ }
1761
+ meta = this.api.registry.findErrorMeta(result.dispatchError);
1762
+ throw new SubmitTransactionError(meta ? "".concat(meta.pallet, ".").concat(meta.name, ": ").concat(meta.docs.join(" ")) : JSON.stringify(result.dispatchError));
1763
+ case 2:
1757
1764
  return _context15.a(2, result.txHash);
1758
1765
  }
1759
- }, _callee15);
1766
+ }, _callee15, this);
1760
1767
  }));
1761
1768
  function signAndSubmitFinalized(_x27, _x28) {
1762
1769
  return _signAndSubmitFinalized.apply(this, arguments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk-dedot",
3
- "version": "14.3.0",
3
+ "version": "14.3.4",
4
4
  "description": "Dedot-based SDK for ParaSpell XCM/XCMP tool for developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,8 +22,8 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@paraspell/sdk-common": "14.3.0",
26
- "@paraspell/sdk-core": "14.3.0"
25
+ "@paraspell/sdk-common": "14.3.4",
26
+ "@paraspell/sdk-core": "14.3.4"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "dedot": ">= 1.3.0",