From bf28ede2299a06fc025007f917c7d9a8bc74bc89 Mon Sep 17 00:00:00 2001 From: Don Mosites Date: Thu, 1 Aug 2024 08:45:35 +0200 Subject: [PATCH] change suggestion --- src/features/orders/ordersActions.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/features/orders/ordersActions.ts b/src/features/orders/ordersActions.ts index 908e15d7..ead3129d 100644 --- a/src/features/orders/ordersActions.ts +++ b/src/features/orders/ordersActions.ts @@ -278,15 +278,8 @@ export const approve = ); if (isAppError(tx)) { - const appError = tx; - dispatch(setErrors([appError])); - - if (appError.error && "message" in appError.error) { - dispatch(declineTransaction(appError.error.message)); - } - dispatch(setStatus("failed")); - + handleOrderError(dispatch, tx); return; }