@subwallet/extension-base 1.3.18-0 → 1.3.18-1

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.
@@ -13,6 +13,6 @@ const packageInfo = {
13
13
  name: '@subwallet/extension-base',
14
14
  path: typeof __dirname === 'string' ? __dirname : 'auto',
15
15
  type: 'cjs',
16
- version: '1.3.18-0'
16
+ version: '1.3.18-1'
17
17
  };
18
18
  exports.packageInfo = packageInfo;
@@ -121,6 +121,7 @@ class AssetHubSwapHandler {
121
121
  };
122
122
  return [step, fee];
123
123
  } catch (e) {
124
+ console.error('Error creating xcm step', e);
124
125
  return undefined;
125
126
  }
126
127
  }
@@ -135,7 +136,7 @@ class AssetHubSwapHandler {
135
136
  return Promise.resolve(undefined);
136
137
  }
137
138
  generateOptimalProcess(params) {
138
- return this.swapBaseHandler.generateOptimalProcess(params, [this.getXcmStep, this.getSubmitStep]);
139
+ return this.swapBaseHandler.generateOptimalProcess(params, [this.getXcmStep.bind(this), this.getSubmitStep.bind(this)]);
139
140
  }
140
141
  async getSwapQuote(request) {
141
142
  const fromAsset = this.chainService.getAssetBySlug(request.pair.from);
@@ -42,7 +42,7 @@ class SwapBaseHandler {
42
42
  };
43
43
  try {
44
44
  for (const genStepFunc of genStepFuncList) {
45
- const step = await genStepFunc.bind(this, params)();
45
+ const step = await genStepFunc(params);
46
46
  if (step) {
47
47
  result.steps.push({
48
48
  id: result.steps.length,
@@ -461,7 +461,7 @@ class ChainflipSwapHandler {
461
461
  return Promise.resolve(undefined);
462
462
  }
463
463
  generateOptimalProcess(params) {
464
- return this.swapBaseHandler.generateOptimalProcess(params, [this.getSubmitStep]);
464
+ return this.swapBaseHandler.generateOptimalProcess(params, [this.getSubmitStep.bind(this)]);
465
465
  }
466
466
  }
467
467
  exports.ChainflipSwapHandler = ChainflipSwapHandler;
@@ -136,6 +136,7 @@ class HydradxHandler {
136
136
  };
137
137
  return [step, fee];
138
138
  } catch (e) {
139
+ console.error('Error creating xcm step', e);
139
140
  return undefined;
140
141
  }
141
142
  }
@@ -190,9 +191,9 @@ class HydradxHandler {
190
191
  return Promise.resolve(undefined);
191
192
  }
192
193
  generateOptimalProcess(params) {
193
- return this.swapBaseHandler.generateOptimalProcess(params, [this.getXcmStep,
194
+ return this.swapBaseHandler.generateOptimalProcess(params, [this.getXcmStep.bind(this),
194
195
  // this.getFeeOptionStep.bind(this),
195
- this.getSubmitStep]);
196
+ this.getSubmitStep.bind(this)]);
196
197
  }
197
198
  getSwapPathErrors(swapList) {
198
199
  return swapList.reduce((prev, current) => {
@@ -243,7 +243,7 @@ class SimpleSwapHandler {
243
243
  }
244
244
  }
245
245
  generateOptimalProcess(params) {
246
- return this.swapBaseHandler.generateOptimalProcess(params, [this.getSubmitStep]);
246
+ return this.swapBaseHandler.generateOptimalProcess(params, [this.getSubmitStep.bind(this)]);
247
247
  }
248
248
  async getSubmitStep(params) {
249
249
  if (params.selectedQuote) {
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "./cjs/detectPackage.js"
18
18
  ],
19
19
  "type": "module",
20
- "version": "1.3.18-0",
20
+ "version": "1.3.18-1",
21
21
  "main": "./cjs/index.js",
22
22
  "module": "./index.js",
23
23
  "types": "./index.d.ts",
@@ -2564,10 +2564,10 @@
2564
2564
  "@sora-substrate/type-definitions": "^1.17.7",
2565
2565
  "@substrate/connect": "^0.8.9",
2566
2566
  "@subwallet/chain-list": "0.2.99-beta.14",
2567
- "@subwallet/extension-base": "^1.3.18-0",
2568
- "@subwallet/extension-chains": "^1.3.18-0",
2569
- "@subwallet/extension-dapp": "^1.3.18-0",
2570
- "@subwallet/extension-inject": "^1.3.18-0",
2567
+ "@subwallet/extension-base": "^1.3.18-1",
2568
+ "@subwallet/extension-chains": "^1.3.18-1",
2569
+ "@subwallet/extension-dapp": "^1.3.18-1",
2570
+ "@subwallet/extension-inject": "^1.3.18-1",
2571
2571
  "@subwallet/keyring": "^0.1.8-beta.0",
2572
2572
  "@subwallet/ui-keyring": "^0.1.8-beta.0",
2573
2573
  "@ton/core": "^0.56.3",
package/packageInfo.js CHANGED
@@ -7,5 +7,5 @@ export const packageInfo = {
7
7
  name: '@subwallet/extension-base',
8
8
  path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
9
9
  type: 'esm',
10
- version: '1.3.18-0'
10
+ version: '1.3.18-1'
11
11
  };
@@ -114,6 +114,7 @@ export class AssetHubSwapHandler {
114
114
  };
115
115
  return [step, fee];
116
116
  } catch (e) {
117
+ console.error('Error creating xcm step', e);
117
118
  return undefined;
118
119
  }
119
120
  }
@@ -128,7 +129,7 @@ export class AssetHubSwapHandler {
128
129
  return Promise.resolve(undefined);
129
130
  }
130
131
  generateOptimalProcess(params) {
131
- return this.swapBaseHandler.generateOptimalProcess(params, [this.getXcmStep, this.getSubmitStep]);
132
+ return this.swapBaseHandler.generateOptimalProcess(params, [this.getXcmStep.bind(this), this.getSubmitStep.bind(this)]);
132
133
  }
133
134
  async getSwapQuote(request) {
134
135
  const fromAsset = this.chainService.getAssetBySlug(request.pair.from);
@@ -34,7 +34,7 @@ export class SwapBaseHandler {
34
34
  };
35
35
  try {
36
36
  for (const genStepFunc of genStepFuncList) {
37
- const step = await genStepFunc.bind(this, params)();
37
+ const step = await genStepFunc(params);
38
38
  if (step) {
39
39
  result.steps.push({
40
40
  id: result.steps.length,
@@ -453,6 +453,6 @@ export class ChainflipSwapHandler {
453
453
  return Promise.resolve(undefined);
454
454
  }
455
455
  generateOptimalProcess(params) {
456
- return this.swapBaseHandler.generateOptimalProcess(params, [this.getSubmitStep]);
456
+ return this.swapBaseHandler.generateOptimalProcess(params, [this.getSubmitStep.bind(this)]);
457
457
  }
458
458
  }
@@ -128,6 +128,7 @@ export class HydradxHandler {
128
128
  };
129
129
  return [step, fee];
130
130
  } catch (e) {
131
+ console.error('Error creating xcm step', e);
131
132
  return undefined;
132
133
  }
133
134
  }
@@ -182,9 +183,9 @@ export class HydradxHandler {
182
183
  return Promise.resolve(undefined);
183
184
  }
184
185
  generateOptimalProcess(params) {
185
- return this.swapBaseHandler.generateOptimalProcess(params, [this.getXcmStep,
186
+ return this.swapBaseHandler.generateOptimalProcess(params, [this.getXcmStep.bind(this),
186
187
  // this.getFeeOptionStep.bind(this),
187
- this.getSubmitStep]);
188
+ this.getSubmitStep.bind(this)]);
188
189
  }
189
190
  getSwapPathErrors(swapList) {
190
191
  return swapList.reduce((prev, current) => {
@@ -234,7 +234,7 @@ export class SimpleSwapHandler {
234
234
  }
235
235
  }
236
236
  generateOptimalProcess(params) {
237
- return this.swapBaseHandler.generateOptimalProcess(params, [this.getSubmitStep]);
237
+ return this.swapBaseHandler.generateOptimalProcess(params, [this.getSubmitStep.bind(this)]);
238
238
  }
239
239
  async getSubmitStep(params) {
240
240
  if (params.selectedQuote) {