Merge remote-tracking branch 'origin/wallet/task/537' into wallet/task/537

This commit is contained in:
Sebastiaan Pasma 2018-08-10 12:12:20 +02:00
commit 335ef9defd
No known key found for this signature in database
GPG key ID: 9A2B0C8B95A1D26F
4 changed files with 9 additions and 5 deletions

View file

@ -214,6 +214,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
var j = 0; var j = 0;
lodash.each(wallets, function(wallet) { 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) { walletService.getStatus(wallet, {}, function(err, status) {
if (err) { if (err) {

View file

@ -158,6 +158,10 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
soundService.play('misc/payment_received.mp3'); soundService.play('misc/payment_received.mp3');
} }
// Notify new tx
$scope.$emit('bwsEvent', $scope.wallet.id);
$scope.$apply(function () { $scope.$apply(function () {
$scope.showingPaymentReceived = true; $scope.showingPaymentReceived = true;
}); });

View file

@ -17,7 +17,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu
sendFlowService.popState(); sendFlowService.popState();
} }
var stateParams = sendFlowService.getState(); $scope.params = sendFlowService.getState();
var config = configService.getSync().wallet.settings; var config = configService.getSync().wallet.settings;
priceDisplayAsFiat = config.priceDisplay === 'fiat'; priceDisplayAsFiat = config.priceDisplay === 'fiat';
@ -29,18 +29,17 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu
$scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer');
break; break;
case 'tabs.send.destination': case 'tabs.send.destination':
if (stateParams.fromWalletId) { if ($scope.params.fromWalletId) {
$scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer');
} }
break; break;
default: default:
if (!stateParams.thirdParty) { if (!$scope.params.thirdParty) {
$scope.sendFlowTitle = gettextCatalog.getString('Send'); $scope.sendFlowTitle = gettextCatalog.getString('Send');
} }
// nop // nop
} }
$scope.params = sendFlowService;
$scope.coin = false; // Wallets to show (for destination screen or contacts) $scope.coin = false; // Wallets to show (for destination screen or contacts)
$scope.type = $scope.params['fromWalletId'] ? 'destination' : 'origin'; // origin || destination $scope.type = $scope.params['fromWalletId'] ? 'destination' : 'origin'; // origin || destination
fromWalletId = $scope.params['fromWalletId']; fromWalletId = $scope.params['fromWalletId'];

View file

@ -90,7 +90,7 @@
// to both being in value. Don't want to use previous currency value. // to both being in value. Don't want to use previous currency value.
// Try to extract currency from value.. // Try to extract currency from value..
var currencySplit = $scope.value.split(" "); var currencySplit = $scope.value.split(" ");
if (currencySplit.length === 2) { if (currencySplit.length === 2 && !$scope.currency) {
$scope.currency = currencySplit[1]; $scope.currency = currencySplit[1];
} }
$scope.currency = $scope.currency || ''; $scope.currency = $scope.currency || '';