Cosmetic fixes

This commit is contained in:
Reckless_Satoshi 2022-01-23 12:23:25 -08:00
parent b934534e1e
commit 8919b7937b
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
3 changed files with 19 additions and 12 deletions

View File

@ -210,10 +210,8 @@ class OrderView(viewsets.ViewSet):
# 8) If status is 'CHA' or 'FSE' and all HTLCS are in LOCKED
elif order.status in [Order.Status.WFI, Order.Status.CHA, Order.Status.FSE]:
print('CCCAAABBAAAAAAAAAAAAAAAA')
# If all bonds are locked.
if order.maker_bond.status == order.taker_bond.status == order.trade_escrow.status == LNPayment.Status.LOCKED:
print('AAABBAAAAAAAAAAAAAAAA')
# add whether a collaborative cancel is pending or has been asked
if (data['is_maker'] and order.taker_asked_cancel) or (data['is_taker'] and order.maker_asked_cancel):
print('PENDING')

View File

@ -51,18 +51,18 @@ export default class OrderPage extends Component {
// Refresh delays according to Order status
this.statusToDelay = {
"0": 3000, //'Waiting for maker bond'
"1": 30000, //'Public'
"0": 2000, //'Waiting for maker bond'
"1": 15000, //'Public'
"2": 9999999, //'Deleted'
"3": 3000, //'Waiting for taker bond'
"3": 2000, //'Waiting for taker bond'
"4": 9999999, //'Cancelled'
"5": 999999, //'Expired'
"6": 3000, //'Waiting for trade collateral and buyer invoice'
"7": 3000, //'Waiting only for seller trade collateral'
"8": 10000, //'Waiting only for buyer invoice'
"8": 8000, //'Waiting only for buyer invoice'
"9": 10000, //'Sending fiat - In chatroom'
"10": 15000, //'Fiat sent - In chatroom'
"11": 60000, //'In dispute'
"10": 10000, //'Fiat sent - In chatroom'
"11": 30000, //'In dispute'
"12": 9999999, //'Collaboratively cancelled'
"13": 3000, //'Sending satoshis to buyer'
"14": 9999999, //'Sucessful trade'
@ -73,11 +73,21 @@ export default class OrderPage extends Component {
}
completeSetState=(newStateVars)=>{
// In case the reply only has "bad_request"
// Do not substitute these two for "undefined" as
// otherStateVars will fail to assign values
if (newStateVars.currency == null){
newStateVars.currency = this.state.currency
newStateVars.status = this.state.status
}
var otherStateVars = {
loading: false,
delay: this.setDelay(newStateVars.status),
currencyCode: this.getCurrencyCode(newStateVars.currency),
};
var completeStateVars = Object.assign({}, newStateVars, otherStateVars);
this.setState(completeStateVars);
}

View File

@ -461,10 +461,9 @@ export default class TradeBox extends Component {
</Grid>
<Grid item xs={12} align="center">
<Typography component="body2" variant="body2" align="left">
<p>We are waiting for the seller to deposit the full trade BTC amount
into the escrow.</p>
<p> Just hang on for a moment. If the seller does not deposit,
you will get your bond back automatically.</p>
<p>We are waiting for the seller lock the trade amount. </p>
<p> Just hang on for a moment. If the seller does not deposit,
you will get your bond back automatically.</p>
</Typography>
</Grid>
{this.showBondIsLocked()}