Skip to content

Commit

Permalink
Style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aftermath2 committed Jun 17, 2024
1 parent 38aab77 commit 5a3d63f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 4 additions & 4 deletions frontend/src/components/TradeBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
});
};

Expand Down
4 changes: 1 addition & 3 deletions tests/utils/trade.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 5a3d63f

Please sign in to comment.