Merge pull request #5751 from cmgustavo/bug/tx-details-mobile

Fix Tx-details on iOS. Smoother transition
This commit is contained in:
Gabriel Edgardo Bazán 2017-03-10 19:29:11 +01:00 committed by GitHub
commit 63b6204004
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();