From wallet currency colour.

This commit is contained in:
Brendon Duncan 2018-08-02 10:07:25 +12:00
commit e58c3bf438
2 changed files with 5 additions and 3 deletions

View file

@ -12,6 +12,7 @@ function reviewController(configService, gettextCatalog, profileService, $scope,
balanceCurrency: '',
color: '',
currency: '',
currencyColor: '',
name: '',
};
vm.primaryAmount = '';
@ -44,14 +45,15 @@ function reviewController(configService, gettextCatalog, profileService, $scope,
vm.origin.color = originWallet.color;
vm.origin.name = originWallet.name;
configService.get(function onConfig(err, configCache) {
configService.get(function onConfig(err, config) {
if (err) {
$log.err('Error getting config.', err);
} else {
console.log('Got config.');
//config = configCache;
// Use this later if have time
priceDisplayIsFiat = configCache.wallet.settings.priceDisplay === 'fiat';
priceDisplayIsFiat = config.wallet.settings.priceDisplay === 'fiat';
vm.origin.currencyColor = originWallet.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor;
}
updateSendAmounts();
getOriginWalletBalance(originWallet);

View file

@ -26,7 +26,7 @@
style="background-color: {{vm.origin.color}}"
></div>
</i>
<h2>{{vm.origin.name}} <span class="highlight" ng-style="{'color': '#eeb640'}">({{vm.origin.currency}})</span></h2>
<h2>{{vm.origin.name}} <span class="highlight" style="color: {{vm.origin.currencyColor}}">({{vm.origin.currency}})</span></h2>
<p ng-show="vm.origin.balanceAmount">{{vm.origin.balanceAmount}} {{vm.origin.balanceCurrency}}</p>
</div>
</div>