Channels
@@ -45,6 +46,7 @@ const Channels = ({
channel={channel}
ticker={ticker}
currentTicker={currentTicker}
+ explorerLinkBase={explorerLinkBase}
/>
)
} else if (Object.prototype.hasOwnProperty.call(channel, 'closing_txid')) {
@@ -54,6 +56,7 @@ const Channels = ({
channel={channel}
ticker={ticker}
currentTicker={currentTicker}
+ explorerLinkBase={explorerLinkBase}
/>
)
}
@@ -85,7 +88,8 @@ Channels.propTypes = {
setChannelForm: PropTypes.func.isRequired,
allChannels: PropTypes.array.isRequired,
openChannel: PropTypes.func.isRequired,
- currentTicker: PropTypes.object.isRequired
+ currentTicker: PropTypes.object.isRequired,
+ explorerLinkBase: PropTypes.string.isRequired
}
export default Channels
diff --git a/app/routes/wallet/components/components/Channels/components/ChannelModal/ChannelModal.js b/app/routes/wallet/components/components/Channels/components/ChannelModal/ChannelModal.js
index db603583..1839ad4a 100644
--- a/app/routes/wallet/components/components/Channels/components/ChannelModal/ChannelModal.js
+++ b/app/routes/wallet/components/components/Channels/components/ChannelModal/ChannelModal.js
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
import ReactModal from 'react-modal'
import styles from './ChannelModal.scss'
-const ChannelModal = ({ isOpen, resetChannel, channel }) => {
+const ChannelModal = ({ isOpen, resetChannel, channel, explorerLinkBase }) => {
const customStyles = {
overlay: {
cursor: 'pointer',
@@ -39,7 +39,7 @@ const ChannelModal = ({ isOpen, resetChannel, channel }) => {
shell.openExternal(`https://testnet.smartbit.com.au/tx/${channel.channel_point.split(':')[0]}`)}
+ onClick={() => shell.openExternal(`${explorerLinkBase}/tx/${channel.channel_point.split(':')[0]}`)}
>
{channel.channel_point}
@@ -88,7 +88,8 @@ const ChannelModal = ({ isOpen, resetChannel, channel }) => {
ChannelModal.propTypes = {
isOpen: PropTypes.bool.isRequired,
resetChannel: PropTypes.func.isRequired,
- channel: PropTypes.object
+ channel: PropTypes.object,
+ explorerLinkBase: PropTypes.string.isRequired
}
export default ChannelModal
diff --git a/app/routes/wallet/components/components/Channels/components/ClosedPendingChannel/ClosedPendingChannel.js b/app/routes/wallet/components/components/Channels/components/ClosedPendingChannel/ClosedPendingChannel.js
index 2bd3a307..db76117a 100644
--- a/app/routes/wallet/components/components/Channels/components/ClosedPendingChannel/ClosedPendingChannel.js
+++ b/app/routes/wallet/components/components/Channels/components/ClosedPendingChannel/ClosedPendingChannel.js
@@ -4,8 +4,8 @@ import PropTypes from 'prop-types'
import { btc } from '../../../../../../../utils'
import styles from './ClosedPendingChannel.scss'
-const ClosedPendingChannel = ({ ticker, channel: { channel, closing_txid }, currentTicker }) => (
-
shell.openExternal(`https://testnet.smartbit.com.au/tx/${closing_txid}`)}>
+const ClosedPendingChannel = ({ ticker, channel: { channel, closing_txid }, currentTicker, explorerLinkBase }) => (
+ shell.openExternal(`${explorerLinkBase}/tx/${closing_txid}`)}>
Status: Closing
@@ -60,7 +60,8 @@ const ClosedPendingChannel = ({ ticker, channel: { channel, closing_txid }, curr
ClosedPendingChannel.propTypes = {
ticker: PropTypes.object.isRequired,
channel: PropTypes.object.isRequired,
- currentTicker: PropTypes.object.isRequired
+ currentTicker: PropTypes.object.isRequired,
+ explorerLinkBase: PropTypes.string.isRequired
}
export default ClosedPendingChannel
diff --git a/app/routes/wallet/components/components/Channels/components/OpenPendingChannel/OpenPendingChannel.js b/app/routes/wallet/components/components/Channels/components/OpenPendingChannel/OpenPendingChannel.js
index 5e2eeb28..5f24d26d 100644
--- a/app/routes/wallet/components/components/Channels/components/OpenPendingChannel/OpenPendingChannel.js
+++ b/app/routes/wallet/components/components/Channels/components/OpenPendingChannel/OpenPendingChannel.js
@@ -4,8 +4,8 @@ import PropTypes from 'prop-types'
import { btc } from '../../../../../../../utils'
import styles from './OpenPendingChannel.scss'
-const OpenPendingChannel = ({ ticker, channel: { channel }, currentTicker }) => (
- shell.openExternal(`https://testnet.smartbit.com.au/tx/${channel.channel_point.split(':')[0]}`)}>
+const OpenPendingChannel = ({ ticker, channel: { channel }, currentTicker, explorerLinkBase }) => (
+ shell.openExternal(`${explorerLinkBase}/tx/${channel.channel_point.split(':')[0]}`)}>
Status: Pending
@@ -60,7 +60,8 @@ const OpenPendingChannel = ({ ticker, channel: { channel }, currentTicker }) =>
OpenPendingChannel.propTypes = {
ticker: PropTypes.object.isRequired,
channel: PropTypes.object.isRequired,
- currentTicker: PropTypes.object.isRequired
+ currentTicker: PropTypes.object.isRequired,
+ explorerLinkBase: PropTypes.string.isRequired
}
export default OpenPendingChannel
diff --git a/app/routes/wallet/containers/WalletContainer.js b/app/routes/wallet/containers/WalletContainer.js
index e9bc00b2..529f44dd 100644
--- a/app/routes/wallet/containers/WalletContainer.js
+++ b/app/routes/wallet/containers/WalletContainer.js
@@ -1,4 +1,5 @@
import { connect } from 'react-redux'
+import { infoSelectors } from '../../../reducers/info'
import { newAddress } from '../../../reducers/address'
import { tickerSelectors } from '../../../reducers/ticker'
import {
@@ -49,7 +50,9 @@ const mapStateToProps = state => ({
peerModalOpen: peersSelectors.peerModalOpen(state),
channelModalOpen: channelsSelectors.channelModalOpen(state),
- currentTicker: tickerSelectors.currentTicker(state)
+ currentTicker: tickerSelectors.currentTicker(state),
+
+ explorerLinkBase: infoSelectors.explorerLinkBase(state)
})
export default connect(mapStateToProps, mapDispatchToProps)(Wallet)