@open-tender/cloud 0.0.68 → 0.0.70

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.
@@ -242,8 +242,7 @@ const checkoutSlice = (0, toolkit_1.createSlice)({
242
242
  extraReducers: builder => {
243
243
  builder
244
244
  .addCase(exports.validateOrder.fulfilled, (state, action) => {
245
- state.check = action.payload.check;
246
- state.errors = action.payload.errors;
245
+ return Object.assign(Object.assign(Object.assign({}, state), action.payload), { loading: 'idle', error: null });
247
246
  })
248
247
  .addCase(exports.validateOrder.pending, state => {
249
248
  state.loading = 'pending';
@@ -82,7 +82,7 @@ exports.loginCustomer = (0, toolkit_1.createAsyncThunk)(AccountActionType.LoginC
82
82
  const { email, password } = data;
83
83
  const api = getState().config.api;
84
84
  const auth = yield api.postLogin(email, password);
85
- dispatch(exports.fetchCustomer);
85
+ dispatch((0, exports.fetchCustomer)());
86
86
  return auth;
87
87
  }
88
88
  catch (err) {
@@ -238,8 +238,7 @@ const checkoutSlice = createSlice({
238
238
  extraReducers: builder => {
239
239
  builder
240
240
  .addCase(validateOrder.fulfilled, (state, action) => {
241
- state.check = action.payload.check;
242
- state.errors = action.payload.errors;
241
+ return Object.assign(Object.assign(Object.assign({}, state), action.payload), { loading: 'idle', error: null });
243
242
  })
244
243
  .addCase(validateOrder.pending, state => {
245
244
  state.loading = 'pending';
@@ -77,7 +77,7 @@ export const loginCustomer = createAsyncThunk(AccountActionType.LoginCustomer, (
77
77
  const { email, password } = data;
78
78
  const api = getState().config.api;
79
79
  const auth = yield api.postLogin(email, password);
80
- dispatch(fetchCustomer);
80
+ dispatch(fetchCustomer());
81
81
  return auth;
82
82
  }
83
83
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/cloud",
3
- "version": "0.0.68",
3
+ "version": "0.0.70",
4
4
  "description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our cloud-based Order API.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",