diff options
author | sdtsui <szehungdanieltsui@gmail.com> | 2017-08-22 00:50:22 +0800 |
---|---|---|
committer | sdtsui <szehungdanieltsui@gmail.com> | 2017-08-22 00:50:22 +0800 |
commit | fe5817051b00a7288fb97541c5674641e978aead (patch) | |
tree | ffc4e5dcaca64208ff577662d929bc36a6588152 /ui | |
parent | 86b71f014a4bda433532cf7cbe7d76b243d3fb70 (diff) | |
download | tangerine-wallet-browser-fe5817051b00a7288fb97541c5674641e978aead.tar tangerine-wallet-browser-fe5817051b00a7288fb97541c5674641e978aead.tar.gz tangerine-wallet-browser-fe5817051b00a7288fb97541c5674641e978aead.tar.bz2 tangerine-wallet-browser-fe5817051b00a7288fb97541c5674641e978aead.tar.lz tangerine-wallet-browser-fe5817051b00a7288fb97541c5674641e978aead.tar.xz tangerine-wallet-browser-fe5817051b00a7288fb97541c5674641e978aead.tar.zst tangerine-wallet-browser-fe5817051b00a7288fb97541c5674641e978aead.zip |
[WIP] Aggregate data for QRView
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/components/modals/account-details-modal.js | 15 | ||||
-rw-r--r-- | ui/app/components/qr-code.js | 6 |
2 files changed, 18 insertions, 3 deletions
diff --git a/ui/app/components/modals/account-details-modal.js b/ui/app/components/modals/account-details-modal.js index 104d2c6ed..2a5359fd4 100644 --- a/ui/app/components/modals/account-details-modal.js +++ b/ui/app/components/modals/account-details-modal.js @@ -3,10 +3,15 @@ const h = require('react-hyperscript') const inherits = require('util').inherits const connect = require('react-redux').connect const actions = require('../../actions') +const { getSelectedIdentity, getSelectedAddress } = require('../../selectors') + +const QrView = require('../qr-code') function mapStateToProps (state) { return { address: state.metamask.selectedAddress, + selectedAddress: getSelectedAddress(state), + selectedIdentity: getSelectedIdentity(state), } } @@ -14,7 +19,8 @@ function mapDispatchToProps (dispatch) { return { hideModal: () => { dispatch(actions.hideModal()) - } + }, + showQrView: (selected, identity) => dispatch(actions.showQrView(selected, identity)), } } @@ -45,7 +51,12 @@ AccountDetailsModal.prototype.render = function () { ]), h('div', {}, [ - 'QR Code', + h(QrView, { + Qr: { + message: this.props.selectedAddress, + data: this.props.selectedIdentity, + } + }, []), ]), h('div', {}, [ diff --git a/ui/app/components/qr-code.js b/ui/app/components/qr-code.js index 06b9aed9b..df749fe17 100644 --- a/ui/app/components/qr-code.js +++ b/ui/app/components/qr-code.js @@ -10,7 +10,11 @@ module.exports = connect(mapStateToProps)(QrCodeView) function mapStateToProps (state) { return { - Qr: state.appState.Qr, + // Qr: state.appState.Qr, + /* + Qr.message - address + Qr.data - identity + */ buyView: state.appState.buyView, warning: state.appState.warning, } |