diff --git a/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js b/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js index 06aecf3..d566912 100644 --- a/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js +++ b/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js @@ -1,5 +1,6 @@ import React from 'react'; import { connect } from 'react-redux'; +import { translate } from '../../../translate/translate'; import { sortByDate } from '../../../util/sort'; import { toggleDashboardTxInfoModal } from '../../../actions/actionCreators'; import Store from '../../../store'; @@ -34,6 +35,29 @@ class WalletsTxInfo extends React.Component { } } + openExplorerWindow(txid) { + const url = 'http://' + this.props.ActiveCoin.coin + '.explorer.supernet.org/tx/' + txid; + const remote = window.require('electron').remote; + const BrowserWindow = remote.BrowserWindow; + + const externalWindow = new BrowserWindow({ + width: 1280, + height: 800, + title: `${translate('INDEX.LOADING')}...`, + icon: remote.getCurrentWindow().iguanaIcon, + webPreferences: { + "nodeIntegration": false + }, + }); + + externalWindow.loadURL(url); + externalWindow.webContents.on('did-finish-load', function() { + setTimeout(function() { + externalWindow.show(); + }, 40); + }); + } + render() { if (this.props && this.props.ActiveCoin.showTransactionInfo && @@ -52,6 +76,7 @@ const mapStateToProps = (state) => { return { ActiveCoin: { mode: state.ActiveCoin.mode, + coin: state.ActiveCoin.coin, txhistory: state.ActiveCoin.txhistory, showTransactionInfo: state.ActiveCoin.showTransactionInfo, activeSection: state.ActiveCoin.activeSection, diff --git a/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js b/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js index d04459e..e6280c0 100644 --- a/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js +++ b/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js @@ -34,6 +34,11 @@ const WalletsTxInfoRender = function(txInfo) { Raw info +
  • + this.openExplorerWindow(txInfo.txid) }> + { translate('INDEX.OPEN_TRANSACTION_IN_EPLORER') } + +
  • diff --git a/react/src/translate/en.js b/react/src/translate/en.js index 5bceaa4..c384f9e 100644 --- a/react/src/translate/en.js +++ b/react/src/translate/en.js @@ -293,7 +293,8 @@ export const _lang = { 'CREATE_INVOICE_QR': 'Create Invoice QR Code', 'QR_CONTENT': 'QR Content', 'CHOOSE_RECEIVING_ADDRESS': 'Choose Address', - 'SAVE_AS_IMAGE': 'Save as Image' + 'SAVE_AS_IMAGE': 'Save as Image', + 'OPEN_TRANSACTION_IN_EPLORER': 'Open transaction in Explorer', }, 'ATOMIC': { 'RAW_OUTPUT': 'Raw Output',