use the correct format for alternative balance

This commit is contained in:
JDonadio 2017-11-07 16:17:43 -03:00
parent 91b60460ac
commit e7ffbe0c33
No known key found for this signature in database
GPG Key ID: EC1F4E04B2BFA730
3 changed files with 5 additions and 5 deletions

View File

@ -7,7 +7,7 @@
<ion-content> <ion-content>
<div class="balance-header"> <div class="balance-header">
<div class="balance-str">{{wallet.status.availableBalanceStr}}</div> <div class="balance-str">{{wallet.status.availableBalanceStr}}</div>
<div class="balance-alt-str">{{alternativeBalanceStr}}</div> <div class="balance-alt-str">{{alternativeBalanceStr || '...'}}</div>
</div> </div>
<ion-list> <ion-list>

View File

@ -24,7 +24,7 @@ page-wallet-details {
font-weight: 600; font-weight: 600;
} }
.balance-alt-str { .balance-alt-str {
font-size: 25px; font-size: 20px;
font-weight: 500; font-weight: 500;
} }
.label { .label {

View File

@ -22,7 +22,7 @@ export class WalletDetailsPage {
console.log('Wallet incomplete'); console.log('Wallet incomplete');
return; return;
}; };
this.alternativeBalanceStr = this.wallet.status.totalBalanceAlternative + ' ' + this.wallet.status.alternativeIsoCode;
this.getTxHistory(); this.getTxHistory();
} }
@ -31,9 +31,9 @@ export class WalletDetailsPage {
} }
getTxHistory(force?: boolean) { getTxHistory(force?: boolean) {
let self = this;
this.walletProvider.getTxHistory_(this.wallet, {force: force}).then((txh) => { this.walletProvider.getTxHistory_(this.wallet, {force: force}).then((txh) => {
this.wallet.completeHistory = txh; self.wallet.completeHistory = txh;
this.alternativeBalanceStr = this.wallet.status.totalBalanceAlternative || '0.00' + ' USD'; //TODO use tx-format provider
}).catch((err) => { }).catch((err) => {
console.log(err); console.log(err);
}); });