From 2c194517eda95be8594532fbc065672e9e1a4978 Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Tue, 4 Sep 2018 15:19:47 +0200 Subject: [PATCH] feat(wallet): show node public address if set Show the node public address if known to make it easier to share node details with other users. Add the data in both the Node address text field as well as the node address QR code. --- app/components/Wallet/ReceiveModal.scss | 10 +++++----- app/routes/app/containers/AppContainer.js | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/components/Wallet/ReceiveModal.scss b/app/components/Wallet/ReceiveModal.scss index 8bb54533..7f618e52 100644 --- a/app/components/Wallet/ReceiveModal.scss +++ b/app/components/Wallet/ReceiveModal.scss @@ -35,8 +35,8 @@ color: $white; .left { - width: 25%; - padding: 30px 40px; + width: 30%; + padding: 30px 30px; .header { h2 { @@ -78,14 +78,14 @@ } .right { - width: 75%; + width: 70%; min-height: 220px; border-left: 1px solid $spaceborder; - padding: 30px 40px; + padding: 30px 30px; .pubkey, .address { - padding: 25px; + padding: 25px 0; h4 { font-size: 12px; diff --git a/app/routes/app/containers/AppContainer.js b/app/routes/app/containers/AppContainer.js index aa0b0732..e615050e 100644 --- a/app/routes/app/containers/AppContainer.js +++ b/app/routes/app/containers/AppContainer.js @@ -1,5 +1,6 @@ import { withRouter } from 'react-router' import { connect } from 'react-redux' +import get from 'lodash.get' import { btc } from 'lib/utils' @@ -397,7 +398,7 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => { const receiveModalProps = { isOpen: stateProps.address.walletModal, network: stateProps.info.network, - pubkey: stateProps.info.data.identity_pubkey, + pubkey: get(stateProps.info, 'data.uris[0]') || get(stateProps.info, 'data.identity_pubkey'), address: stateProps.address.address, alias: stateProps.info.data.alias, closeReceiveModal: dispatchProps.closeWalletModal