Browse Source
On the receive modal, label the address Testnet when appropriate
renovate/lint-staged-8.x
Ben Woosley
7 years ago
No known key found for this signature in database
GPG Key ID: 6EE5F3785F78B345
4 changed files with
10 additions and
2 deletions
-
app/components/Wallet/ReceiveModal.js
-
app/reducers/info.js
-
app/routes/app/containers/AppContainer.js
-
test/reducers/__snapshots__/info.spec.js.snap
|
|
@ -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 { |
|
|
|
</div> |
|
|
|
|
|
|
|
<div className={styles.address}> |
|
|
|
<h4>Bitcoin Address</h4> |
|
|
|
<h4>Bitcoin {network.name} Address</h4> |
|
|
|
<p> |
|
|
|
<span className={styles.data}>{address}</span> |
|
|
|
<span onClick={() => 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, |
|
|
|
|
|
@ -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: '' |
|
|
|
|
|
@ -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, |
|
|
|
|
|
@ -27,6 +27,7 @@ Object { |
|
|
|
"wif": 128, |
|
|
|
}, |
|
|
|
"explorerUrl": "https://smartbit.com.au", |
|
|
|
"name": null, |
|
|
|
"unitPrefix": "", |
|
|
|
}, |
|
|
|
"showWalletCurrencyFilters": false, |
|
|
|