From 8b59895a0517bc7afcf0330caf4c348eeeb38490 Mon Sep 17 00:00:00 2001 From: Mariusz Klochowicz Date: Wed, 6 Oct 2021 09:35:28 +1030 Subject: [PATCH] Rename "Accept / Reject" to "Pending" in CfdTables Pending is a more succinct nudge to the user that they should react with an action to the CFDs inside these tables. --- frontend/src/MakerApp.tsx | 22 +++++++++------------- frontend/src/components/Types.tsx | 12 ++++++------ 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/frontend/src/MakerApp.tsx b/frontend/src/MakerApp.tsx index c370c22..0b0c676 100644 --- a/frontend/src/MakerApp.tsx +++ b/frontend/src/MakerApp.tsx @@ -69,13 +69,9 @@ export default function App() { }, }); - const acceptOrRejectOrder = cfds.filter((value) => value.state.getGroup() === StateGroupKey.ACCEPT_OR_REJECT_ORDER); - const acceptOrRejectSettlement = cfds.filter((value) => - value.state.getGroup() === StateGroupKey.ACCEPT_OR_REJECT_SETTLEMENT - ); - const acceptOrRejectRollOvers = cfds.filter((value) => - value.state.getGroup() === StateGroupKey.ACCEPT_OR_REJECT_ROLL_OVER - ); + const pendingOrders = cfds.filter((value) => value.state.getGroup() === StateGroupKey.PENDING_ORDER); + const pendingSettlements = cfds.filter((value) => value.state.getGroup() === StateGroupKey.PENDING_SETTLEMENT); + const pendingRollOvers = cfds.filter((value) => value.state.getGroup() === StateGroupKey.PENDING_ROLL_OVER); const opening = cfds.filter((value) => value.state.getGroup() === StateGroupKey.OPENING); const open = cfds.filter((value) => value.state.getGroup() === StateGroupKey.OPEN); const closed = cfds.filter((value) => value.state.getGroup() === StateGroupKey.CLOSED); @@ -166,9 +162,9 @@ export default function App() { Open [{open.length}] - Accept / Reject Order [{acceptOrRejectOrder.length}] - Accept / Reject Settlement [{acceptOrRejectSettlement.length}] - Accept / Reject Roll Overs [{acceptOrRejectRollOvers.length}] + Pending Orders [{pendingOrders.length}] + Pending Settlements [{pendingSettlements.length}] + Pending Roll Overs [{pendingRollOvers.length}] Opening [{opening.length}] Closed [{closed.length}] @@ -178,13 +174,13 @@ export default function App() { - + - + - + diff --git a/frontend/src/components/Types.tsx b/frontend/src/components/Types.tsx index acc3462..b2f30b8 100644 --- a/frontend/src/components/Types.tsx +++ b/frontend/src/components/Types.tsx @@ -132,7 +132,7 @@ export class State { public getGroup(): StateGroupKey { switch (this.key) { case StateKey.INCOMING_ORDER_REQUEST: - return StateGroupKey.ACCEPT_OR_REJECT_ORDER; + return StateGroupKey.PENDING_ORDER; case StateKey.OUTGOING_ORDER_REQUEST: case StateKey.ACCEPTED: @@ -150,10 +150,10 @@ export class State { return StateGroupKey.OPEN; case StateKey.INCOMING_SETTLEMENT_PROPOSAL: - return StateGroupKey.ACCEPT_OR_REJECT_SETTLEMENT; + return StateGroupKey.PENDING_SETTLEMENT; case StateKey.INCOMING_ROLL_OVER_PROPOSAL: - return StateGroupKey.ACCEPT_OR_REJECT_ROLL_OVER; + return StateGroupKey.PENDING_ROLL_OVER; case StateKey.REJECTED: case StateKey.REFUNDED: @@ -199,11 +199,11 @@ const enum StateKey { export enum StateGroupKey { /// A CFD which is still being set up (not on chain yet) OPENING = "Opening", - ACCEPT_OR_REJECT_ORDER = "Accept / Reject Order", + PENDING_ORDER = "Pending Order", /// A CFD that is an ongoing open position (on chain) OPEN = "Open", - ACCEPT_OR_REJECT_SETTLEMENT = "Accept / Reject Settlement", - ACCEPT_OR_REJECT_ROLL_OVER = "Accept / Reject Roll Over", + PENDING_SETTLEMENT = "Pending Settlement", + PENDING_ROLL_OVER = "Pending Roll Over", /// A CFD that has been successfully or not-successfully terminated CLOSED = "Closed", }