diff --git a/frontend/src/components/TradeBox/index.tsx b/frontend/src/components/TradeBox/index.tsx index 3e18e0a50..12a42b860 100644 --- a/frontend/src/components/TradeBox/index.tsx +++ b/frontend/src/components/TradeBox/index.tsx @@ -204,7 +204,7 @@ const TradeBox = ({ baseUrl, onStartAgain }: TradeBoxProps): JSX.Element => { mining_fee_rate, statement, rating, - cancel_status + cancel_status }: SubmitActionProps): void { const robot = garage.getSlot()?.getRobot(); const currentOrder = garage.getSlot()?.order; @@ -248,12 +248,12 @@ const TradeBox = ({ baseUrl, onStartAgain }: TradeBoxProps): JSX.Element => { }; const cancel = function (no_confirmation?: boolean) { - const currentOrder = garage.getSlot()?.order; + const currentOrder = garage.getSlot()?.order; setLoadingButtons({ ...noLoadingButtons, cancel: true }); submitAction({ - action: 'cancel', - cancel_status: no_confirmation ? currentOrder?.status : undefined + action: 'cancel', + cancel_status: no_confirmation ? currentOrder?.status : undefined }); }; diff --git a/tests/utils/trade.py b/tests/utils/trade.py index 9d39e62cf..5a8498381 100644 --- a/tests/utils/trade.py +++ b/tests/utils/trade.py @@ -116,9 +116,7 @@ def cancel_order(self, robot_index=1, cancel_status=None): path = reverse("order") params = f"?order_id={self.order_id}" headers = self.get_robot_auth(robot_index) - body = {"action": "cancel"} - if cancel_status is not None: - body.update({"cancel_status": cancel_status}) + body = {"action": "cancel", "cancel_status": cancel_status} self.response = self.client.post(path + params, body, **headers) def pause_order(self, robot_index=1):