diff --git a/www/js/controllers/transfer-controllers.js b/www/js/controllers/transfer-controllers.js index 9c3c4fbca584721d2702672b37a43f26a92e3f7a..f31635e58eb682211aef8540605f71e7e6404bd3 100644 --- a/www/js/controllers/transfer-controllers.js +++ b/www/js/controllers/transfer-controllers.js @@ -108,7 +108,7 @@ function TransferController($scope, $controller, UIUtils, csWot, csWallet) { }; } -function TransferModalController($scope, $q, $translate, $filter, BMA, csWallet, UIUtils, Modals, +function TransferModalController($scope, $q, $translate, $timeout, $filter, BMA, csWallet, UIUtils, Modals, csCurrency, csSettings, parameters) { 'ngInject'; @@ -244,11 +244,14 @@ function TransferModalController($scope, $q, $translate, $filter, BMA, csWallet, return csWallet.transfer($scope.formData.destPub, amount, $scope.formData.comment, $scope.formData.useRelative); }) .then(function() { + UIUtils.loading.hide(); return $scope.closeModal(true); }) - .then(UIUtils.loading.hide) - .then(function() { - UIUtils.toast.show('INFO.TRANSFER_SENT'); + .then(function(res) { + $timeout(function() { + UIUtils.toast.show('INFO.TRANSFER_SENT'); + }, 500); + return res; }) .catch(UIUtils.onError('ERROR.SEND_TX_FAILED')); }); diff --git a/www/js/controllers/wallet-controllers.js b/www/js/controllers/wallet-controllers.js index 3af2dc7ce58a132fc23dd3c3d27fcf02f2519d0c..a2c6b03ef18a07844c2869b5dde45b3618461dd2 100644 --- a/www/js/controllers/wallet-controllers.js +++ b/www/js/controllers/wallet-controllers.js @@ -601,12 +601,7 @@ function WalletTxController($scope, $filter, $ionicPopover, $state, $timeout, UI UIUtils.alert.info('INFO.NOT_ENOUGH_CREDIT'); return; } - Modals.showTransfer() - .then(function(done){ - if (done) { - UIUtils.toast.show('INFO.TRANSFER_SENT'); - } - }); + return Modals.showTransfer(); }; $scope.showHelpTip = function(index, isTour) {