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

View File

@ -106,6 +106,12 @@ export class BisqDashboardComponent implements OnInit {
]) ])
.pipe( .pipe(
map(([trades, markets]) => { 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 => { return trades.map((trade => {
trade._market = markets[trade.market]; trade._market = markets[trade.market];
return trade; return trade;

View File

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