@pisell/pisellos 0.0.244 → 0.0.245

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.
@@ -121,7 +121,7 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
121
121
  async initializeCheckoutAsync(params) {
122
122
  try {
123
123
  await this.setStatus(import_types.CheckoutStatus.Initializing);
124
- const validation = await this.validateCheckoutParams(params);
124
+ const validation = this.validateCheckoutParams(params);
125
125
  if (!validation.valid) {
126
126
  throw (0, import_utils.createCheckoutError)(
127
127
  import_types.CheckoutErrorType.ValidationFailed,
@@ -194,7 +194,7 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
194
194
  try {
195
195
  await this.resetStoreStateAsync();
196
196
  await this.setStatus(import_types.CheckoutStatus.CreatingOrder);
197
- const validation = await this.validateLocalOrderData(params.orderData);
197
+ const validation = this.validateLocalOrderData(params.orderData);
198
198
  if (!validation.valid) {
199
199
  throw (0, import_utils.createCheckoutError)(
200
200
  import_types.CheckoutErrorType.ValidationFailed,
@@ -238,13 +238,13 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
238
238
  }
239
239
  });
240
240
  this.store.currentOrder = paymentOrder;
241
- await this.initWalletData();
241
+ this.initWalletData();
242
242
  await this.setStatus(import_types.CheckoutStatus.OrderCreated);
243
243
  await this.setStep(import_types.CheckoutStep.PaymentMethod);
244
244
  if (params.autoPayment) {
245
245
  await this.setStep(import_types.CheckoutStep.PaymentProcessing);
246
246
  }
247
- await this.core.effects.emit(import_types.CheckoutHooks.OnOrderCreated, {
247
+ this.core.effects.emit(import_types.CheckoutHooks.OnOrderCreated, {
248
248
  order: paymentOrder,
249
249
  timestamp: Date.now()
250
250
  });
@@ -263,7 +263,7 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
263
263
  error,
264
264
  import_types.CheckoutErrorType.OrderCreationFailed
265
265
  );
266
- await this.core.effects.emit(import_types.CheckoutHooks.OnOrderCreationFailed, {
266
+ this.core.effects.emit(import_types.CheckoutHooks.OnOrderCreationFailed, {
267
267
  error: this.store.lastError,
268
268
  timestamp: Date.now()
269
269
  });
@@ -1799,13 +1799,13 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
1799
1799
  /**
1800
1800
  * 验证结账参数
1801
1801
  */
1802
- async validateCheckoutParams(params) {
1802
+ validateCheckoutParams(params) {
1803
1803
  return (0, import_utils.validateCheckoutData)(params);
1804
1804
  }
1805
1805
  /**
1806
1806
  * 验证本地订单数据
1807
1807
  */
1808
- async validateLocalOrderData(orderData) {
1808
+ validateLocalOrderData(orderData) {
1809
1809
  var _a;
1810
1810
  const errors = [];
1811
1811
  if (!orderData.type) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.244",
4
+ "version": "0.0.245",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",