mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
[WIP] Aggregate data for QRView
This commit is contained in:
parent
86b71f014a
commit
fe5817051b
@ -3,10 +3,15 @@ const h = require('react-hyperscript')
|
|||||||
const inherits = require('util').inherits
|
const inherits = require('util').inherits
|
||||||
const connect = require('react-redux').connect
|
const connect = require('react-redux').connect
|
||||||
const actions = require('../../actions')
|
const actions = require('../../actions')
|
||||||
|
const { getSelectedIdentity, getSelectedAddress } = require('../../selectors')
|
||||||
|
|
||||||
|
const QrView = require('../qr-code')
|
||||||
|
|
||||||
function mapStateToProps (state) {
|
function mapStateToProps (state) {
|
||||||
return {
|
return {
|
||||||
address: state.metamask.selectedAddress,
|
address: state.metamask.selectedAddress,
|
||||||
|
selectedAddress: getSelectedAddress(state),
|
||||||
|
selectedIdentity: getSelectedIdentity(state),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -14,7 +19,8 @@ function mapDispatchToProps (dispatch) {
|
|||||||
return {
|
return {
|
||||||
hideModal: () => {
|
hideModal: () => {
|
||||||
dispatch(actions.hideModal())
|
dispatch(actions.hideModal())
|
||||||
}
|
},
|
||||||
|
showQrView: (selected, identity) => dispatch(actions.showQrView(selected, identity)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,7 +51,12 @@ AccountDetailsModal.prototype.render = function () {
|
|||||||
]),
|
]),
|
||||||
|
|
||||||
h('div', {}, [
|
h('div', {}, [
|
||||||
'QR Code',
|
h(QrView, {
|
||||||
|
Qr: {
|
||||||
|
message: this.props.selectedAddress,
|
||||||
|
data: this.props.selectedIdentity,
|
||||||
|
}
|
||||||
|
}, []),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
h('div', {}, [
|
h('div', {}, [
|
||||||
|
@ -10,7 +10,11 @@ module.exports = connect(mapStateToProps)(QrCodeView)
|
|||||||
|
|
||||||
function mapStateToProps (state) {
|
function mapStateToProps (state) {
|
||||||
return {
|
return {
|
||||||
Qr: state.appState.Qr,
|
// Qr: state.appState.Qr,
|
||||||
|
/*
|
||||||
|
Qr.message - address
|
||||||
|
Qr.data - identity
|
||||||
|
*/
|
||||||
buyView: state.appState.buyView,
|
buyView: state.appState.buyView,
|
||||||
warning: state.appState.warning,
|
warning: state.appState.warning,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user