Browse Source

Merge pull request #362 from LN-Zap/fix/hardcoded-wallet-modal

fix(ReceiveModal): remove hardcoded alias and replace with dynamic al…
renovate/lint-staged-8.x
JimmyMow 7 years ago
committed by GitHub
parent
commit
94cf5adf90
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/components/Wallet/ReceiveModal.js
  2. 1
      app/routes/app/containers/AppContainer.js

4
app/components/Wallet/ReceiveModal.js

@ -37,6 +37,7 @@ class ReceiveModal extends React.Component {
isOpen, isOpen,
pubkey, pubkey,
address, address,
alias,
closeReceiveModal closeReceiveModal
} = this.props } = this.props
@ -55,7 +56,7 @@ class ReceiveModal extends React.Component {
<div className={styles.content}> <div className={styles.content}>
<section className={styles.left}> <section className={styles.left}>
<header className={styles.header}> <header className={styles.header}>
<h2>JimmyMow</h2> <h2>{alias && alias.length ? alias : pubkey.substring(0, 10)}</h2>
<div className={styles.qrCodeOptions}> <div className={styles.qrCodeOptions}>
<div className={qrCodeType === 1 && styles.active} onClick={changeQrCode}>Node Pubkey</div> <div className={qrCodeType === 1 && styles.active} onClick={changeQrCode}>Node Pubkey</div>
@ -105,6 +106,7 @@ ReceiveModal.propTypes = {
isOpen: PropTypes.bool.isRequired, isOpen: PropTypes.bool.isRequired,
pubkey: PropTypes.string, pubkey: PropTypes.string,
address: PropTypes.string.isRequired, address: PropTypes.string.isRequired,
alias: PropTypes.string.isRequired,
closeReceiveModal: PropTypes.func.isRequired closeReceiveModal: PropTypes.func.isRequired
} }

1
app/routes/app/containers/AppContainer.js

@ -370,6 +370,7 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => {
isOpen: stateProps.address.walletModal, isOpen: stateProps.address.walletModal,
pubkey: stateProps.info.data.identity_pubkey, pubkey: stateProps.info.data.identity_pubkey,
address: stateProps.address.address, address: stateProps.address.address,
alias: stateProps.info.data.alias,
newAddress: dispatchProps.newAddress, newAddress: dispatchProps.newAddress,
closeReceiveModal: dispatchProps.closeWalletModal closeReceiveModal: dispatchProps.closeWalletModal
} }

Loading…
Cancel
Save