mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-31 02:21:35 +00:00
Fix UI. Hide unneeded expiry bars. Refresh book always. Round to 8 BTC decimals.
This commit is contained in:
parent
64357c9c20
commit
a98ff65638
@ -497,19 +497,19 @@ class Order(models.Model):
|
||||
3: int(config("EXP_TAKER_BOND_INVOICE")), # 'Waiting for taker bond'
|
||||
4: 0, # 'Cancelled'
|
||||
5: 0, # 'Expired'
|
||||
6: self.escrow_duration, # 'Waiting for trade collateral and buyer invoice'
|
||||
6: int(self.escrow_duration), # 'Waiting for trade collateral and buyer invoice'
|
||||
7: 60 * int(config("INVOICE_AND_ESCROW_DURATION")), # 'Waiting only for seller trade collateral'
|
||||
8: 60 * int(config("INVOICE_AND_ESCROW_DURATION")), # 'Waiting only for buyer invoice'
|
||||
9: 60 * 60 * int(config("FIAT_EXCHANGE_DURATION")), # 'Sending fiat - In chatroom'
|
||||
10: 60 * 60 * int(config("FIAT_EXCHANGE_DURATION")),# 'Fiat sent - In chatroom'
|
||||
11: 1 * 24 * 60 * 60, # 'In dispute'
|
||||
12: 0, # 'Collaboratively cancelled'
|
||||
13: 10 * 24 * 60 * 60, # 'Sending satoshis to buyer'
|
||||
14: 1 * 24 * 60 * 60, # 'Sucessful trade'
|
||||
15: 10 * 24 * 60 * 60, # 'Failed lightning network routing'
|
||||
16: 10 * 24 * 60 * 60, # 'Wait for dispute resolution'
|
||||
17: 1 * 24 * 60 * 60, # 'Maker lost dispute'
|
||||
18: 1 * 24 * 60 * 60, # 'Taker lost dispute'
|
||||
13: 100 * 24 * 60 * 60, # 'Sending satoshis to buyer'
|
||||
14: 100 * 24 * 60 * 60, # 'Sucessful trade'
|
||||
15: 100 * 24 * 60 * 60, # 'Failed lightning network routing'
|
||||
16: 100 * 24 * 60 * 60, # 'Wait for dispute resolution'
|
||||
17: 100 * 24 * 60 * 60, # 'Maker lost dispute'
|
||||
18: 100 * 24 * 60 * 60, # 'Taker lost dispute'
|
||||
}
|
||||
|
||||
return t_to_expire[status]
|
||||
|
@ -892,8 +892,8 @@ class InfoView(ListAPIView):
|
||||
lifetime_volume = 0
|
||||
|
||||
context["last_day_nonkyc_btc_premium"] = round(avg_premium, 2)
|
||||
context["last_day_volume"] = total_volume
|
||||
context["lifetime_volume"] = lifetime_volume
|
||||
context["last_day_volume"] = round(total_volume, 8)
|
||||
context["lifetime_volume"] = round(lifetime_volume, 8)
|
||||
context["lnd_version"] = get_lnd_version()
|
||||
context["robosats_running_commit_hash"] = get_commit_robosats()
|
||||
context["alternative_site"] = config("ALTERNATIVE_SITE")
|
||||
|
@ -21,10 +21,10 @@ class BookPage extends Component {
|
||||
this.state = {
|
||||
pageSize: 6,
|
||||
};
|
||||
}
|
||||
|
||||
if(this.props.bookOrders.length == 0){
|
||||
this.getOrderDetails(2, 0)
|
||||
}
|
||||
componentDidMount() {
|
||||
this.getOrderDetails(2, 0)
|
||||
}
|
||||
|
||||
getOrderDetails(type, currency) {
|
||||
|
@ -605,16 +605,22 @@ class OrderPage extends Component {
|
||||
</Grid>
|
||||
</ListItem>
|
||||
|
||||
<Divider />
|
||||
<ListItem>
|
||||
<ListItemIcon>
|
||||
<AccessTimeIcon/>
|
||||
</ListItemIcon>
|
||||
<ListItemText secondary={t("Expires in")}>
|
||||
<Countdown date={new Date(this.state.expires_at)} renderer={this.countdownRenderer} />
|
||||
</ListItemText>
|
||||
</ListItem>
|
||||
<LinearDeterminate key={this.state.total_secs_exp} totalSecsExp={this.state.total_secs_exp} expiresAt={this.state.expires_at}/>
|
||||
{/* if order is in a status that does not expire, do not show countdown */}
|
||||
{[4,12,13,14,15,16,17,18].includes(this.state.status)? null :
|
||||
<>
|
||||
<Divider />
|
||||
<ListItem>
|
||||
<ListItemIcon>
|
||||
<AccessTimeIcon/>
|
||||
</ListItemIcon>
|
||||
<ListItemText secondary={t("Expires in")}>
|
||||
<Countdown date={new Date(this.state.expires_at)} renderer={this.countdownRenderer} />
|
||||
</ListItemText>
|
||||
</ListItem>
|
||||
<LinearDeterminate key={this.state.total_secs_exp} totalSecsExp={this.state.total_secs_exp} expiresAt={this.state.expires_at}/>
|
||||
</>
|
||||
}
|
||||
|
||||
</List>
|
||||
|
||||
{/* If the user has a penalty/limit */}
|
||||
|
@ -1159,7 +1159,7 @@ handleRatingRobosatsChange=(e)=>{
|
||||
return(
|
||||
<Grid container spacing={1}>
|
||||
{/* Make confirmation sound for Chat Open. */}
|
||||
{this.Sound("chat-open")}
|
||||
{this.Sound("locked-invoice")}
|
||||
<Grid item xs={12} align="center">
|
||||
<Typography variant="subtitle1">
|
||||
<b> {this.props.data.is_seller ? t("Chat with the buyer"): t("Chat with the seller")}</b> {" " + this.stepXofY()}
|
||||
|
Loading…
Reference in New Issue
Block a user