mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #7035 from JDonadio/stats-03
Use coin label properly
This commit is contained in:
commit
03a5ce3078
|
@ -41,7 +41,7 @@
|
|||
<span class="value">{{totals.totalTxps}}</span>
|
||||
</div>
|
||||
<div class="col card">
|
||||
<span class="total-label">Amount (BTC)</span>
|
||||
<span class="total-label">Amount ({{coin}})</span>
|
||||
<span class="value">{{totals.totalAmount}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -82,7 +82,7 @@
|
|||
<option value="perMonth">Per month</option>
|
||||
</select>
|
||||
</div>
|
||||
<h3 id="amount" class="graphs-label">Amount (BTC)</h3>
|
||||
<h3 id="amount" class="graphs-label">Amount ({{coin}})</h3>
|
||||
<div id="chart-amount" class="chart panel"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -13,6 +13,7 @@ import * as moment from 'moment';
|
|||
})
|
||||
export class AppComponent implements OnInit {
|
||||
public totals: any;
|
||||
public coin: string;
|
||||
|
||||
private opts: any;
|
||||
private config: any;
|
||||
|
@ -30,6 +31,7 @@ export class AppComponent implements OnInit {
|
|||
) {
|
||||
const defaultDateFrom = '2015-01-01';
|
||||
const defaultDateTo = moment().format('YYYY-MM-DD');
|
||||
this.coin = 'BTC';
|
||||
this.dateFrom.formatted = defaultDateFrom;
|
||||
this.dateTo.formatted = defaultDateTo;
|
||||
this.selector = 0;
|
||||
|
@ -67,6 +69,7 @@ export class AppComponent implements OnInit {
|
|||
}
|
||||
|
||||
getStatsFromCoin(coin: string) {
|
||||
this.coin = coin.toUpperCase();
|
||||
this.opts.from = this.dateFrom.formatted;
|
||||
this.opts.to = this.dateTo.formatted;
|
||||
this.fetch(coin);
|
||||
|
|
Loading…
Reference in New Issue