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

@ -147,7 +147,8 @@ angular.module('copayApp.controllers').controller('HistoryController',
_.each(res, function(r) {
var tx = index[r.ts];
tx.alternativeAmount = $filter('noFractionNumber')(
(r.rate != null ? tx.amountSat * rateService.SAT_TO_BTC * r.rate : null);
(r.rate != null ? tx.amountSat * rateService.SAT_TO_BTC * r.rate : null))
;
});
setTimeout(function() {
$scope.$digest();

View file

@ -1,5 +1,5 @@
'use strict';
angular.module('copayApp.controllers').controller('ProfileController', function($scope, $rootScope, $location, $modal, backupService) {
angular.module('copayApp.controllers').controller('ProfileController', function($scope, $rootScope, $location, $modal, backupService, identityService) {
$scope.username = $rootScope.iden.getName();
$scope.isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
@ -16,10 +16,11 @@ angular.module('copayApp.controllers').controller('ProfileController', function(
$scope.deleteWallet = function(w) {
if (!w) return;
$scope.loading = w.id;
identityService.deleteWallet(w.id,function() {
identityService.deleteWallet(w, function(err) {
$scope.loading = false;
if (err) {
log.warn(err);
}
});
};