Merge pull request #51 from gabrielbazan7/fix/txDetails

fix transations details note and external link
This commit is contained in:
Matias Alejo Garcia 2016-09-02 15:01:10 -03:00 committed by GitHub
commit 3ee06cdab9
3 changed files with 15 additions and 6 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('txDetailsController', function($rootScope, $log, $scope, $filter, $stateParams, $ionicPopup, gettextCatalog, profileService, configService, lodash, txFormatService) {
angular.module('copayApp.controllers').controller('txDetailsController', function($rootScope, $log, $scope, $filter, $stateParams, $ionicPopup, gettextCatalog, profileService, configService, lodash, txFormatService, platformInfo) {
var self = $scope.self;
var wallet = profileService.getWallet($stateParams.walletId);
@ -36,7 +36,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
txid: $scope.btx.txid,
};
if (!lodash.isEmpty($scope.data.comment)) {
if ($scope.data.comment) {
args.body = $scope.data.comment;
};
@ -80,6 +80,15 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
});
};
$scope.openExternalLink = function(url, target) {
if (platformInfo.isNW) {
nodeWebkit.openExternalLink(url);
} else {
target = target || '_blank';
var ref = window.open(url, target, 'location=no');
}
};
$scope.getShortNetworkName = function() {
var n = wallet.credentials.network;
return n.substring(0, 4);