Merge pull request #5714 from gabrielbazan7/fix/alterCurrencyUpdate

update alternative amount on tx-details view
This commit is contained in:
Javier Donadío 2017-03-03 21:50:04 +02:00 committed by GitHub
commit bdb0be0088
1 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('txDetailsController', function($log, $ionicHistory, $scope, $timeout, walletService, lodash, gettextCatalog, profileService, configService, externalLinkService, popupService, ongoingProcess) {
angular.module('copayApp.controllers').controller('txDetailsController', function($log, $ionicHistory, $scope, $timeout, walletService, lodash, gettextCatalog, profileService, configService, externalLinkService, popupService, ongoingProcess, txFormatService) {
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.title = gettextCatalog.getString('Transaction');
@ -17,7 +17,9 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
$ionicHistory.goBack();
return popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Transaction not found'));
}
$scope.btx = tx;
$scope.btx = txFormatService.processTx(tx);
if ($scope.btx.action != 'invalid') {
if ($scope.btx.action == 'sent') $scope.title = gettextCatalog.getString('Sent Funds');
if ($scope.btx.action == 'received') $scope.title = gettextCatalog.getString('Received Funds');