Fix Tx-defailts on iOS. Smoother transition

This commit is contained in:
Gustavo Maximiliano Cortez 2017-03-10 12:00:57 -03:00
commit 3d1b79418a
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
2 changed files with 17 additions and 16 deletions

View file

@ -17,7 +17,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
listeners = [
$rootScope.$on('bwsEvent', function(e, walletId, type, n) {
if (type == 'NewBlock' && n && n.data && n.data.network == 'livenet') {
updateTx();
updateTx({hideLoading: true});
}
})
];
@ -88,10 +88,11 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
}, 10);
}
var updateTx = function() {
ongoingProcess.set('loadingTxInfo', true);
var updateTx = function(opts) {
opts = opts || {};
if (!opts.hideLoading) ongoingProcess.set('loadingTxInfo', true);
walletService.getTx($scope.wallet, txId, function(err, tx) {
ongoingProcess.set('loadingTxInfo', false);
if (!opts.hideLoading) ongoingProcess.set('loadingTxInfo', false);
if (err) {
$log.warn('Error getting transaction' + err);
$ionicHistory.goBack();