1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

[WIP] Render a QR code in AccountDetailsModal

This commit is contained in:
sdtsui 2017-08-21 10:06:29 -07:00
parent fe5817051b
commit b836d0483d
2 changed files with 6 additions and 8 deletions

View File

@ -10,7 +10,7 @@ const QrView = require('../qr-code')
function mapStateToProps (state) {
return {
address: state.metamask.selectedAddress,
selectedAddress: getSelectedAddress(state),
// selectedAddress: getSelectedAddress(state),
selectedIdentity: getSelectedIdentity(state),
}
}
@ -35,6 +35,8 @@ module.exports = connect(mapStateToProps, mapDispatchToProps)(AccountDetailsModa
// It is the only component in this codebase that does so
// It utilizes modal styles
AccountDetailsModal.prototype.render = function () {
const { selectedIdentity } = this.props
return h('div', {}, [
h('div.account-details-modal-wrapper', {
}, [
@ -53,8 +55,8 @@ AccountDetailsModal.prototype.render = function () {
h('div', {}, [
h(QrView, {
Qr: {
message: this.props.selectedAddress,
data: this.props.selectedIdentity,
message: this.props.selectedIdentity.name,
data: this.props.selectedIdentity.address,
}
}, []),
]),

View File

@ -10,11 +10,7 @@ module.exports = connect(mapStateToProps)(QrCodeView)
function mapStateToProps (state) {
return {
// Qr: state.appState.Qr,
/*
Qr.message - address
Qr.data - identity
*/
// Qr code is not fetched from state. 'message' and 'data' props are passed instead.
buyView: state.appState.buyView,
warning: state.appState.warning,
}