mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-05 22:10:10 +00:00
Cosmetic fixes
This commit is contained in:
parent
b934534e1e
commit
8919b7937b
@ -210,10 +210,8 @@ class OrderView(viewsets.ViewSet):
|
|||||||
|
|
||||||
# 8) If status is 'CHA' or 'FSE' and all HTLCS are in LOCKED
|
# 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]:
|
elif order.status in [Order.Status.WFI, Order.Status.CHA, Order.Status.FSE]:
|
||||||
print('CCCAAABBAAAAAAAAAAAAAAAA')
|
|
||||||
# If all bonds are locked.
|
# If all bonds are locked.
|
||||||
if order.maker_bond.status == order.taker_bond.status == order.trade_escrow.status == LNPayment.Status.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
|
# 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):
|
if (data['is_maker'] and order.taker_asked_cancel) or (data['is_taker'] and order.maker_asked_cancel):
|
||||||
print('PENDING')
|
print('PENDING')
|
||||||
|
@ -51,18 +51,18 @@ export default class OrderPage extends Component {
|
|||||||
|
|
||||||
// Refresh delays according to Order status
|
// Refresh delays according to Order status
|
||||||
this.statusToDelay = {
|
this.statusToDelay = {
|
||||||
"0": 3000, //'Waiting for maker bond'
|
"0": 2000, //'Waiting for maker bond'
|
||||||
"1": 30000, //'Public'
|
"1": 15000, //'Public'
|
||||||
"2": 9999999, //'Deleted'
|
"2": 9999999, //'Deleted'
|
||||||
"3": 3000, //'Waiting for taker bond'
|
"3": 2000, //'Waiting for taker bond'
|
||||||
"4": 9999999, //'Cancelled'
|
"4": 9999999, //'Cancelled'
|
||||||
"5": 999999, //'Expired'
|
"5": 999999, //'Expired'
|
||||||
"6": 3000, //'Waiting for trade collateral and buyer invoice'
|
"6": 3000, //'Waiting for trade collateral and buyer invoice'
|
||||||
"7": 3000, //'Waiting only for seller trade collateral'
|
"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'
|
"9": 10000, //'Sending fiat - In chatroom'
|
||||||
"10": 15000, //'Fiat sent - In chatroom'
|
"10": 10000, //'Fiat sent - In chatroom'
|
||||||
"11": 60000, //'In dispute'
|
"11": 30000, //'In dispute'
|
||||||
"12": 9999999, //'Collaboratively cancelled'
|
"12": 9999999, //'Collaboratively cancelled'
|
||||||
"13": 3000, //'Sending satoshis to buyer'
|
"13": 3000, //'Sending satoshis to buyer'
|
||||||
"14": 9999999, //'Sucessful trade'
|
"14": 9999999, //'Sucessful trade'
|
||||||
@ -73,11 +73,21 @@ export default class OrderPage extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
completeSetState=(newStateVars)=>{
|
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 = {
|
var otherStateVars = {
|
||||||
loading: false,
|
loading: false,
|
||||||
delay: this.setDelay(newStateVars.status),
|
delay: this.setDelay(newStateVars.status),
|
||||||
currencyCode: this.getCurrencyCode(newStateVars.currency),
|
currencyCode: this.getCurrencyCode(newStateVars.currency),
|
||||||
};
|
};
|
||||||
|
|
||||||
var completeStateVars = Object.assign({}, newStateVars, otherStateVars);
|
var completeStateVars = Object.assign({}, newStateVars, otherStateVars);
|
||||||
this.setState(completeStateVars);
|
this.setState(completeStateVars);
|
||||||
}
|
}
|
||||||
|
@ -461,10 +461,9 @@ export default class TradeBox extends Component {
|
|||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12} align="center">
|
<Grid item xs={12} align="center">
|
||||||
<Typography component="body2" variant="body2" align="left">
|
<Typography component="body2" variant="body2" align="left">
|
||||||
<p>We are waiting for the seller to deposit the full trade BTC amount
|
<p>We are waiting for the seller lock the trade amount. </p>
|
||||||
into the escrow.</p>
|
<p> Just hang on for a moment. If the seller does not deposit,
|
||||||
<p> Just hang on for a moment. If the seller does not deposit,
|
you will get your bond back automatically.</p>
|
||||||
you will get your bond back automatically.</p>
|
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
{this.showBondIsLocked()}
|
{this.showBondIsLocked()}
|
||||||
|
Loading…
Reference in New Issue
Block a user