@open-tender/cloud 0.4.40 → 0.4.42

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.
@@ -276,7 +276,7 @@ const checkoutSlice = (0, toolkit_1.createSlice)({
276
276
  extraReducers: builder => {
277
277
  builder
278
278
  .addCase(exports.validateOrder.fulfilled, (state, action) => {
279
- return Object.assign(Object.assign(Object.assign({}, state), action.payload), { loading: 'idle', error: null });
279
+ return Object.assign(Object.assign(Object.assign({}, state), action.payload), { error: null });
280
280
  })
281
281
  .addCase(exports.validateOrder.pending, state => {
282
282
  state.loading = 'pending';
@@ -309,6 +309,11 @@ const checkoutSlice = (0, toolkit_1.createSlice)({
309
309
  state.loading = 'idle';
310
310
  state.submitting = false;
311
311
  state.errors = action.payload || {};
312
+ })
313
+ .addMatcher(action => action.type.endsWith('/fulfilled'), state => {
314
+ setTimeout(() => {
315
+ state.loading = 'idle';
316
+ }, 0);
312
317
  });
313
318
  }
314
319
  });
@@ -272,7 +272,7 @@ const checkoutSlice = createSlice({
272
272
  extraReducers: builder => {
273
273
  builder
274
274
  .addCase(validateOrder.fulfilled, (state, action) => {
275
- return Object.assign(Object.assign(Object.assign({}, state), action.payload), { loading: 'idle', error: null });
275
+ return Object.assign(Object.assign(Object.assign({}, state), action.payload), { error: null });
276
276
  })
277
277
  .addCase(validateOrder.pending, state => {
278
278
  state.loading = 'pending';
@@ -305,6 +305,11 @@ const checkoutSlice = createSlice({
305
305
  state.loading = 'idle';
306
306
  state.submitting = false;
307
307
  state.errors = action.payload || {};
308
+ })
309
+ .addMatcher(action => action.type.endsWith('/fulfilled'), state => {
310
+ setTimeout(() => {
311
+ state.loading = 'idle';
312
+ }, 0);
308
313
  });
309
314
  }
310
315
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/cloud",
3
- "version": "0.4.40",
3
+ "version": "0.4.42",
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",