@paraspell/sdk-dedot 13.4.1 → 13.5.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 +10 -4
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -829,8 +829,12 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
829
829
  }, {
830
830
  key: "encodeTx",
831
831
  value: function encodeTx(hex) {
832
+ // Pad odd-length hex to match PAPI behavior (0x0 -> 0x00)
833
+ var prefix = hex.startsWith("0x") ? "0x" : "";
834
+ var body = prefix ? hex.slice(2) : hex;
835
+ var padded = body.length % 2 === 1 ? "0".concat(body) : body;
832
836
  return {
833
- encoded: hex
837
+ encoded: "".concat(prefix).concat(padded)
834
838
  };
835
839
  }
836
840
  }, {
@@ -1218,9 +1222,11 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1218
1222
  _context7.p = 13;
1219
1223
  _t3 = _context7.v;
1220
1224
  _msg = _t3 instanceof Error ? _t3.message : String(_t3);
1221
- failureErr = failureErr || {
1222
- failureReason: _msg
1223
- };
1225
+ if (!failureErr.failureReason) {
1226
+ failureErr = {
1227
+ failureReason: _msg
1228
+ };
1229
+ }
1224
1230
  return _context7.a(2, {
1225
1231
  success: false,
1226
1232
  failureReason: failureErr.failureReason,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk-dedot",
3
- "version": "13.4.1",
3
+ "version": "13.5.0",
4
4
  "description": "Dedot-based SDK for ParaSpell XCM/XCMP tool for developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,7 +22,7 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@paraspell/sdk-core": "13.4.1"
25
+ "@paraspell/sdk-core": "13.5.0"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "dedot": ">= 1.3.0",