diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index 9c4f2bee9..318fcece2 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -214,6 +214,7 @@ angular.module('copayApp.controllers').controller('tabHomeController', var j = 0; lodash.each(wallets, function(wallet) { + walletService.invalidateCache(wallet); // Temporary solution, to have the good balance, when we ask to reload the wallets. walletService.getStatus(wallet, {}, function(err, status) { if (err) { diff --git a/src/js/controllers/tab-receive.js b/src/js/controllers/tab-receive.js index 190f1b752..c822b4521 100644 --- a/src/js/controllers/tab-receive.js +++ b/src/js/controllers/tab-receive.js @@ -158,6 +158,10 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi soundService.play('misc/payment_received.mp3'); } + // Notify new tx + $scope.$emit('bwsEvent', $scope.wallet.id); + + $scope.$apply(function () { $scope.showingPaymentReceived = true; }); diff --git a/src/js/controllers/tab-send.js b/src/js/controllers/tab-send.js index 81b3e4ca5..3f1da01fc 100644 --- a/src/js/controllers/tab-send.js +++ b/src/js/controllers/tab-send.js @@ -28,14 +28,15 @@ angular.module('copayApp.controllers').controller('tabSendController', function( }; $scope.$on("$ionicView.enter", function(event, data) { + + var stateParams = sendFlowService.getState(); + $scope.fromWallet = profileService.getWallet(stateParams.fromWalletId); + clipboardService.readFromClipboard(function(text) { if (text.length > 200) { text = text.substring(0, 200); } - var stateParams = sendFlowService.getState(); - $scope.fromWallet = profileService.getWallet(stateParams.fromWalletId); - $scope.clipboardHasAddress = false; $scope.clipboardHasContent = false; if ((text.indexOf('bitcoincash:') === 0 || text[0] === 'C' || text[0] === 'H' || text[0] === 'p' || text[0] === 'q') && text.replace('bitcoincash:', '').length === 42) { // CashAddr diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js index 1a05fd360..9f70b37ed 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -90,7 +90,7 @@ // to both being in value. Don't want to use previous currency value. // Try to extract currency from value.. var currencySplit = $scope.value.split(" "); - if (currencySplit.length === 2) { + if (currencySplit.length === 2 && !$scope.currency) { $scope.currency = currencySplit[1]; } $scope.currency = $scope.currency || '';