Hide latest altcoin trades when not using official bisq markets.

This commit is contained in:
softsimon 2021-04-24 20:33:56 +04:00
parent 165aa6eee2
commit 95a80157a7
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7
3 changed files with 10 additions and 4 deletions

View File

@ -44,12 +44,12 @@
<br><br>
<h2>Trade History (Last 100 trades)</h2>
<h2>Latest trades</h2>
<table class="table table-borderless table-striped">
<thead>
<th>Date</th>
<th>Price</th>
<th>Trade amount (BTC)</th>
<th>Trade amount</th>
<th>Trade amount</th>
</thead>
<tbody *ngIf="trades$ | async as trades; else loadingTmpl">

View File

@ -106,6 +106,12 @@ export class BisqDashboardComponent implements OnInit {
])
.pipe(
map(([trades, markets]) => {
if (!this.stateService.env.OFFICIAL_BISQ_MARKETS) {
trades = trades.filter((trade) => {
const pair = trade.market.split('_');
return !(pair[1] === 'btc' && this.allowCryptoCoins.indexOf(pair[0]) === -1);
});
}
return trades.map((trade => {
trade._market = markets[trade.market];
return trade;

View File

@ -67,8 +67,8 @@
<thead>
<th>Date</th>
<th>Price ({{ currency.market.rsymbol }})</th>
<th>Trade size ({{ currency.market.rsymbol }})</th>
<th>Trade size ({{ currency.market.lsymbol }})</th>
<th>Trade amount ({{ currency.market.rsymbol }})</th>
<th>Trade amount ({{ currency.market.lsymbol }})</th>
</thead>
<tbody>
<tr *ngFor="let trade of trades">