From 1f920c926855d9a5b6798999c075c5cca64c31bc Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Sun, 1 May 2022 10:05:58 -0700 Subject: [PATCH] Fix DEL in clean orders. Add cancel button to paused order --- api/management/commands/clean_orders.py | 1 - frontend/src/components/MakerPage.js | 4 +- frontend/src/components/OrderPage.js | 2 +- .../components/icons/BuySatsCheckedIcon.js | 59 +------------------ frontend/src/components/icons/BuySatsIcon.js | 46 --------------- .../components/icons/SellSatsCheckedIcon.js | 57 ------------------ frontend/src/components/icons/SellSatsIcon.js | 46 --------------- 7 files changed, 5 insertions(+), 210 deletions(-) diff --git a/api/management/commands/clean_orders.py b/api/management/commands/clean_orders.py index 73535cd1..a72725f1 100644 --- a/api/management/commands/clean_orders.py +++ b/api/management/commands/clean_orders.py @@ -19,7 +19,6 @@ class Command(BaseCommand): # TODO handle 'database is locked' do_nothing = [ - Order.Status.DEL, Order.Status.UCA, Order.Status.EXP, Order.Status.DIS, diff --git a/frontend/src/components/MakerPage.js b/frontend/src/components/MakerPage.js index d857038b..a303eefe 100644 --- a/frontend/src/components/MakerPage.js +++ b/frontend/src/components/MakerPage.js @@ -270,13 +270,13 @@ class MakerPage extends Component { } checkedIcon={}/>} + control={} checkedIcon={}/>} label={this.state.type == 0 ? {t("Buy")}: {t("Buy")}} labelPlacement="end" /> } checkedIcon={}/>} + control={} checkedIcon={}/>} label={this.state.type == 1 ? {t("Sell")}: {t("Sell")}} labelPlacement="end" /> diff --git a/frontend/src/components/OrderPage.js b/frontend/src/components/OrderPage.js index 63991257..9868983f 100644 --- a/frontend/src/components/OrderPage.js +++ b/frontend/src/components/OrderPage.js @@ -433,7 +433,7 @@ class OrderPage extends Component { const { t } = this.props; // If maker and Waiting for Bond. Or if taker and Waiting for bond. // Simply allow to cancel without showing the cancel dialog. - if ((this.state.is_maker & [0,1].includes(this.state.status)) || this.state.is_taker & this.state.status == 3){ + if ((this.state.is_maker & [0,1,2].includes(this.state.status)) || this.state.is_taker & this.state.status == 3){ return( diff --git a/frontend/src/components/icons/BuySatsCheckedIcon.js b/frontend/src/components/icons/BuySatsCheckedIcon.js index 6460dbd1..e914fe57 100644 --- a/frontend/src/components/icons/BuySatsCheckedIcon.js +++ b/frontend/src/components/icons/BuySatsCheckedIcon.js @@ -38,6 +38,7 @@ export default function BuySatsCheckedIcon(props) { l-5.442-4.856l-3.457-3.085l-5.444-4.856l-2.892-2.583l-5.444-4.855l-2.046-1.825L175.396,52.89z M167.82,61.006l1.902,1.699 l5.444,4.857l2.896,2.582L183.505,75l3.457,3.085l5.44,4.857l2.168,1.933l-4.823,5.407l-0.929-0.826l-1.856-1.658l-5.442-4.857 l-3.457-3.085L172.618,75l-2.896-2.582l-5.44-4.856l-1.284-1.147L167.82,61.006z"/> + + c6.154,5.604,6.668,8.671,6.664,11.104V257.663z,"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -111,7 +66,6 @@ export default function BuySatsIcon(props) { H30.08c-7.992,0-14.494-6.502-14.494-14.494V30.08c0-7.992,6.502-14.494,14.494-14.494h239.841 c7.991,0,14.492,6.502,14.492,14.494V269.92z"/> - ); } \ No newline at end of file diff --git a/frontend/src/components/icons/SellSatsCheckedIcon.js b/frontend/src/components/icons/SellSatsCheckedIcon.js index 7d8710d3..ea098f67 100644 --- a/frontend/src/components/icons/SellSatsCheckedIcon.js +++ b/frontend/src/components/icons/SellSatsCheckedIcon.js @@ -50,63 +50,6 @@ export default function SellSatsCheckedIcon(props) { c-15.838-4.071-41.292-16.888-59.836-27.526c-16.43-9.426-27.969-17.125-34.295-22.881c-6.154-5.604-6.668-8.672-6.664-11.104 V42.337L45.527,42.337z"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -112,7 +67,6 @@ export default function SellSatsIcon(props) { c7.992,0,14.494,6.502,14.494,14.494v239.84c0,7.992-6.502,14.494-14.494,14.494H30.079c-7.991,0-14.492-6.502-14.492-14.494 V30.08z"/> - ); } \ No newline at end of file