From 6b167d4bfdf991d425c4833476745aa778498837 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 28 Apr 2015 17:28:49 -0300 Subject: [PATCH] android fix 2 --- src/js/controllers/walletHome.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/js/controllers/walletHome.js b/src/js/controllers/walletHome.js index fd425e7f3..3238ea2bb 100644 --- a/src/js/controllers/walletHome.js +++ b/src/js/controllers/walletHome.js @@ -484,10 +484,10 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi } } else { self.onGoingProcess = name; + $timeout(function() { + $rootScope.$apply(); + }); }; - $timeout(function() { - $rootScope.$apply(); - }); }; this.submitForm = function() { @@ -556,13 +556,12 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi if (signedTx.status == 'accepted') { self.setOngoingProcess('Broadcasting transaction'); fc.broadcastTxProposal(signedTx, function(err, btx) { + self.setOngoingProcess(); if (err) { - self.setOngoingProcess(); $scope.error = 'Transaction not broadcasted. Please try again.'; $scope.$digest(); - return; + return cb(err); } - self.setOngoingProcess(); $scope.$emit('Local/TxProposalAction'); txStatus.notify(btx, function() { return cb();