updates karma tests

This commit is contained in:
Matias Alejo Garcia 2014-11-30 23:08:16 -03:00
commit f490f4a661
6 changed files with 37 additions and 46 deletions

View file

@ -19,6 +19,7 @@ angular.module('copayApp.services')
var r = {};
r.totalBalance = $filter('noFractionNumber')(balanceSat * satToUnit);
r.totalBalanceBTC = (balanceSat / COIN);
var availableBalanceNr = safeBalanceSat * satToUnit;
r.availableBalance = $filter('noFractionNumber')(safeBalanceSat * satToUnit);
r.availableBalanceBTC = (safeBalanceSat / COIN);
r.safeUnspentCount = safeUnspentCount;
@ -29,7 +30,7 @@ angular.module('copayApp.services')
if (r.safeUnspentCount) {
var estimatedFee = copay.Wallet.estimatedFee(r.safeUnspentCount);
r.topAmount = (((r.availableBalance * w.settings.unitToSatoshi).toFixed(0) - estimatedFee) / w.settings.unitToSatoshi);
r.topAmount = (((availableBalanceNr * w.settings.unitToSatoshi).toFixed(0) - estimatedFee) / w.settings.unitToSatoshi);
}
var balanceByAddr = {};

View file

@ -87,8 +87,8 @@ angular.module('copayApp.services')
});
};
root.deleteWallet = function($scope, iden, w) {
$rootScope.iden.deleteWallet(w.id);
root.deleteWallet = function(w, cb) {
$rootScope.iden.deleteWallet(w.id, cb);
};
root.isFocused = function(wid) {