settings: fix balance bug 2
This commit is contained in:
parent
3691bd5ee0
commit
53869531c2
2 changed files with 4 additions and 4 deletions
|
|
@ -45,12 +45,12 @@ angular.module('copayApp.filters', [])
|
|||
};
|
||||
})
|
||||
.filter('noFractionNumber',
|
||||
[ '$filter', '$locale',
|
||||
function(filter, locale) {
|
||||
[ '$filter', '$locale', '$rootScope',
|
||||
function(filter, locale, $rootScope) {
|
||||
var numberFilter = filter('number');
|
||||
var formats = locale.NUMBER_FORMATS;
|
||||
return function(amount, n) {
|
||||
var fractionSize = (typeof(n) != 'undefined') ? n : config.unitToSatoshi.toString().length - 1;
|
||||
var fractionSize = (typeof(n) != 'undefined') ? n : $rootScope.wallet.settings.unitToSatoshi.toString().length - 1;
|
||||
var value = numberFilter(amount, fractionSize);
|
||||
var sep = value.indexOf(formats.DECIMAL_SEP);
|
||||
var group = value.indexOf(formats.GROUP_SEP);
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ function Wallet(opts) {
|
|||
this.id = opts.id || Wallet.getRandomId();
|
||||
this.secretNumber = opts.secretNumber || Wallet.getRandomNumber();
|
||||
this.lock = new WalletLock(this.storage, this.id, opts.lockTimeOutMin);
|
||||
this.settings = opts.settings || copayConfig.settings;
|
||||
this.settings = opts.settings || copayConfig.wallet.settings;
|
||||
this.name = opts.name;
|
||||
|
||||
this.publicKeyRing.walletId = this.id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue