made dollar green default colour for bitcoin cash
This commit is contained in:
parent
9fdaf78c32
commit
be5c7b4728
6 changed files with 31 additions and 14 deletions
|
|
@ -5,6 +5,7 @@ angular.module('copayApp.controllers').controller('preferencesColorController',
|
|||
$scope.wallet = wallet;
|
||||
var walletId = wallet.credentials.walletId;
|
||||
var config = configService.getSync();
|
||||
var defaults = configService.getDefaults();
|
||||
config.colorFor = config.colorFor || {};
|
||||
|
||||
var retries = 3;
|
||||
|
|
@ -27,7 +28,11 @@ angular.module('copayApp.controllers').controller('preferencesColorController',
|
|||
};
|
||||
|
||||
function getColorDefault() {
|
||||
return rgb2hex(window.getComputedStyle(document.getElementsByClassName('wallet-color-default')[0]).color);
|
||||
if ($scope.wallet.coin == 'bch') {
|
||||
return defaults.bitcoinCashWalletColor;
|
||||
} else {
|
||||
return defaults.bitcoinWalletColor;
|
||||
}
|
||||
};
|
||||
|
||||
function getColorCount() {
|
||||
|
|
|
|||
|
|
@ -106,7 +106,9 @@ angular.module('copayApp.services').factory('configService', function(storageSer
|
|||
},
|
||||
|
||||
bitcoinAlias: 'btc',
|
||||
bitcoinCashAlias: 'bch'
|
||||
bitcoinCashAlias: 'bch',
|
||||
bitcoinWalletColor: '#fab915', // Observatory
|
||||
bitcoinCashWalletColor: '#26B03C' // Dollar Green
|
||||
};
|
||||
|
||||
var configCache = null;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,10 @@ angular.module('copayApp.services')
|
|||
configService.whenAvailable(function(config) {
|
||||
wallet.usingCustomBWS = config.bwsFor && config.bwsFor[wallet.id] && (config.bwsFor[wallet.id] != defaults.bws.url);
|
||||
wallet.name = (config.aliasFor && config.aliasFor[wallet.id]) || wallet.credentials.walletName;
|
||||
wallet.color = (config.colorFor && config.colorFor[wallet.id]);
|
||||
wallet.color = (config.colorFor && config.colorFor[wallet.id])
|
||||
|| (wallet.coin == 'bch'
|
||||
? defaults.bitcoinCashWalletColor
|
||||
: defaults.bitcoinWalletColor);
|
||||
wallet.email = config.emailFor && config.emailFor[wallet.id];
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue