From d4748bbdf5ebc003af8e5f5e8540ae5da00bc7ae Mon Sep 17 00:00:00 2001 From: Jack Mallers Date: Fri, 1 Dec 2017 12:45:29 -0600 Subject: [PATCH] fix(address): add new address button until address bug is tracked down --- app/components/Wallet/ReceiveModal.js | 11 ++++++++--- app/components/Wallet/ReceiveModal.scss | 13 ++++++++++++- app/components/Wallet/Wallet.js | 7 +++++-- app/routes/activity/components/Activity.js | 6 ++++-- app/routes/activity/containers/ActivityContainer.js | 5 ++++- 5 files changed, 33 insertions(+), 9 deletions(-) diff --git a/app/components/Wallet/ReceiveModal.js b/app/components/Wallet/ReceiveModal.js index ef310b95..761f4e36 100644 --- a/app/components/Wallet/ReceiveModal.js +++ b/app/components/Wallet/ReceiveModal.js @@ -6,7 +6,7 @@ import QRCode from 'qrcode.react' import { showNotification } from 'notifications' import styles from './ReceiveModal.scss' -const ReceiveModal = ({ isOpen, hideActivityModal, pubkey, address }) => { +const ReceiveModal = ({ isOpen, hideActivityModal, pubkey, address, newAddress }) => { const customStyles = { overlay: { cursor: 'pointer' @@ -43,8 +43,12 @@ const ReceiveModal = ({ isOpen, hideActivityModal, pubkey, address }) => {
-

Deposit Address ( copyOnClick(address)}>Copy)

+
+

Deposit Address ( copyOnClick(address)}>Copy)

+ newAddress('p2pkh')}>New Address +

{address}

+
@@ -58,7 +62,8 @@ ReceiveModal.propTypes = { isOpen: PropTypes.bool.isRequired, hideActivityModal: PropTypes.func.isRequired, pubkey: PropTypes.string.isRequired, - address: PropTypes.string.isRequired + address: PropTypes.string.isRequired, + newAddress: PropTypes.func.isRequired } export default ReceiveModal diff --git a/app/components/Wallet/ReceiveModal.scss b/app/components/Wallet/ReceiveModal.scss index 960969aa..50c32dc6 100644 --- a/app/components/Wallet/ReceiveModal.scss +++ b/app/components/Wallet/ReceiveModal.scss @@ -35,4 +35,15 @@ padding: 10px; } } -} \ No newline at end of file +} + +.addressHeader { + display: flex; + flex-direction: row; + justify-content: space-between; + + .newAddress { + text-decoration: underline; + font-size: 12px; + } +} diff --git a/app/components/Wallet/Wallet.js b/app/components/Wallet/Wallet.js index 19019995..10130a5e 100644 --- a/app/components/Wallet/Wallet.js +++ b/app/components/Wallet/Wallet.js @@ -21,7 +21,8 @@ class Wallet extends Component { const { balance, address, - info + info, + newAddress } = this.props const { modalOpen } = this.state @@ -35,6 +36,7 @@ class Wallet extends Component { hideActivityModal={() => this.setState({ modalOpen: false })} pubkey={info.data.identity_pubkey} address={address} + newAddress={newAddress} />) }
@@ -65,7 +67,8 @@ class Wallet extends Component { Wallet.propTypes = { balance: PropTypes.object.isRequired, address: PropTypes.string.isRequired, - info: PropTypes.object.isRequired + info: PropTypes.object.isRequired, + newAddress: PropTypes.func.isRequired } export default Wallet diff --git a/app/routes/activity/components/Activity.js b/app/routes/activity/components/Activity.js index 1e5e84a9..36503b90 100644 --- a/app/routes/activity/components/Activity.js +++ b/app/routes/activity/components/Activity.js @@ -55,7 +55,8 @@ class Activity extends Component { changeFilter, toggleFilterPulldown, currentActivity, - nonActiveFilters + nonActiveFilters, + newAddress } = this.props if (invoiceLoading || paymentLoading) { return
Loading...
} @@ -70,7 +71,7 @@ class Activity extends Component { currentTicker={currentTicker} /> - +