From d30aeff4117f0501b88fcde7a2b21a39cf8cac9d Mon Sep 17 00:00:00 2001 From: Marty Alcala Date: Fri, 21 Oct 2016 18:40:37 -0400 Subject: [PATCH] add view on blockchain button --- src/js/controllers/modals/txDetails.js | 8 ++++++++ src/sass/views/includes/txp-details.scss | 7 +++++++ www/views/modals/tx-details.html | 11 ++++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/js/controllers/modals/txDetails.js b/src/js/controllers/modals/txDetails.js index 59a23f711..b579a2c5e 100644 --- a/src/js/controllers/modals/txDetails.js +++ b/src/js/controllers/modals/txDetails.js @@ -191,6 +191,14 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio // }); // }; + $scope.viewOnBlockchain = function() { + var btx = $scope.btx; + var url = 'https://' + ($scope.getShortNetworkName() == 'test' ? 'test-' : '') + 'insight.bitpay.com/tx/' + btx.txid; + var title = 'View Transaction on Insight'; + var message = 'Would you like to view this transaction on the Insight blockchain explorer?'; + $scope.openExternalLink(url, true, title, message, 'Open Insight', 'Go back'); + }; + $scope.openExternalLink = function(url, optIn, title, message, okText, cancelText) { externalLinkService.open(url, optIn, title, message, okText, cancelText); }; diff --git a/src/sass/views/includes/txp-details.scss b/src/sass/views/includes/txp-details.scss index 85a111226..74693b491 100644 --- a/src/sass/views/includes/txp-details.scss +++ b/src/sass/views/includes/txp-details.scss @@ -235,4 +235,11 @@ color: $item-label-color; padding: 1rem 2rem; } + + .view-on-blockchain-btn { + //background: #EDEDED; + background: #e8e7e7; + color: rgba(58, 58, 58, .6); + margin-bottom: 1.5rem; + } } diff --git a/www/views/modals/tx-details.html b/www/views/modals/tx-details.html index c210c134a..8e8f1dd58 100644 --- a/www/views/modals/tx-details.html +++ b/www/views/modals/tx-details.html @@ -95,9 +95,18 @@ - + + + + + +