diff --git a/app/components/Wallet/ReceiveModal.js b/app/components/Wallet/ReceiveModal.js index 48013986..e24db13b 100644 --- a/app/components/Wallet/ReceiveModal.js +++ b/app/components/Wallet/ReceiveModal.js @@ -38,7 +38,8 @@ class ReceiveModal extends React.Component { pubkey, address, alias, - closeReceiveModal + closeReceiveModal, + network } = this.props const { qrCodeType } = this.state @@ -87,7 +88,7 @@ class ReceiveModal extends React.Component {
-

Bitcoin Address

+

Bitcoin {network.name} Address

{address} copyOnClick(address)} className={`${styles.copy} hint--left`} data-hint='Copy address'> @@ -103,6 +104,9 @@ class ReceiveModal extends React.Component { } ReceiveModal.propTypes = { + network: PropTypes.shape({ + name: PropTypes.string + }).isRequired, isOpen: PropTypes.bool.isRequired, pubkey: PropTypes.string, address: PropTypes.string.isRequired, diff --git a/app/reducers/info.js b/app/reducers/info.js index 9d9b64c0..22e2ae2f 100644 --- a/app/reducers/info.js +++ b/app/reducers/info.js @@ -38,11 +38,13 @@ export const receiveInfo = (event, data) => (dispatch) => { const networks = { testnet: { + name: 'Testnet', explorerUrl: 'https://testnet.smartbit.com.au', bitcoinJsNetwork: bitcoin.networks.testnet, unitPrefix: 't' }, mainnet: { + name: null, // no name since it is the presumed default explorerUrl: 'https://smartbit.com.au', bitcoinJsNetwork: bitcoin.networks.bitcoin, unitPrefix: '' diff --git a/app/routes/app/containers/AppContainer.js b/app/routes/app/containers/AppContainer.js index 7a3609e5..5f261f49 100644 --- a/app/routes/app/containers/AppContainer.js +++ b/app/routes/app/containers/AppContainer.js @@ -376,6 +376,7 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => { const receiveModalProps = { isOpen: stateProps.address.walletModal, + network: stateProps.info.network, pubkey: stateProps.info.data.identity_pubkey, address: stateProps.address.address, alias: stateProps.info.data.alias, diff --git a/test/reducers/__snapshots__/info.spec.js.snap b/test/reducers/__snapshots__/info.spec.js.snap index 51494c79..e73a2362 100644 --- a/test/reducers/__snapshots__/info.spec.js.snap +++ b/test/reducers/__snapshots__/info.spec.js.snap @@ -27,6 +27,7 @@ Object { "wif": 128, }, "explorerUrl": "https://smartbit.com.au", + "name": null, "unitPrefix": "", }, "showWalletCurrencyFilters": false,