Fix link to blockchain
This commit is contained in:
parent
6f3cea4a89
commit
9d85481ae6
1 changed files with 8 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
||||||
var txId;
|
var txId;
|
||||||
var listeners = [];
|
var listeners = [];
|
||||||
var config = configService.getSync();
|
var config = configService.getSync();
|
||||||
|
var blockexplorerUrl;
|
||||||
|
|
||||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||||
txId = data.stateParams.txid;
|
txId = data.stateParams.txid;
|
||||||
|
|
@ -15,6 +16,12 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
||||||
$scope.isShared = $scope.wallet.credentials.n > 1;
|
$scope.isShared = $scope.wallet.credentials.n > 1;
|
||||||
$scope.txsUnsubscribedForNotifications = config.confirmedTxsNotifications ? !config.confirmedTxsNotifications.enabled : true;
|
$scope.txsUnsubscribedForNotifications = config.confirmedTxsNotifications ? !config.confirmedTxsNotifications.enabled : true;
|
||||||
|
|
||||||
|
if ($scope.wallet.coin == 'bch') {
|
||||||
|
blockexplorerUrl = 'cashexplorer.bitcoin.com';
|
||||||
|
} else {
|
||||||
|
blockexplorerUrl = 'insight.bitpay.com';
|
||||||
|
}
|
||||||
|
|
||||||
txConfirmNotification.checkIfEnabled(txId, function(res) {
|
txConfirmNotification.checkIfEnabled(txId, function(res) {
|
||||||
$scope.txNotification = {
|
$scope.txNotification = {
|
||||||
value: res
|
value: res
|
||||||
|
|
@ -178,7 +185,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
||||||
|
|
||||||
$scope.viewOnBlockchain = function() {
|
$scope.viewOnBlockchain = function() {
|
||||||
var btx = $scope.btx;
|
var btx = $scope.btx;
|
||||||
var url = 'https://' + ($scope.getShortNetworkName() == 'test' ? 'test-' : '') + 'insight.bitpay.com/tx/' + btx.txid;
|
var url = 'https://' + ($scope.getShortNetworkName() == 'test' ? 'test-' : '') + blockexplorerUrl + '/tx/' + btx.txid;
|
||||||
var optIn = true;
|
var optIn = true;
|
||||||
var title = null;
|
var title = null;
|
||||||
var message = gettextCatalog.getString('View Transaction on Insight');
|
var message = gettextCatalog.getString('View Transaction on Insight');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue