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:
parent
fe5817051b
commit
b836d0483d
@ -10,7 +10,7 @@ const QrView = require('../qr-code')
|
|||||||
function mapStateToProps (state) {
|
function mapStateToProps (state) {
|
||||||
return {
|
return {
|
||||||
address: state.metamask.selectedAddress,
|
address: state.metamask.selectedAddress,
|
||||||
selectedAddress: getSelectedAddress(state),
|
// selectedAddress: getSelectedAddress(state),
|
||||||
selectedIdentity: getSelectedIdentity(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 is the only component in this codebase that does so
|
||||||
// It utilizes modal styles
|
// It utilizes modal styles
|
||||||
AccountDetailsModal.prototype.render = function () {
|
AccountDetailsModal.prototype.render = function () {
|
||||||
|
const { selectedIdentity } = this.props
|
||||||
|
|
||||||
return h('div', {}, [
|
return h('div', {}, [
|
||||||
h('div.account-details-modal-wrapper', {
|
h('div.account-details-modal-wrapper', {
|
||||||
}, [
|
}, [
|
||||||
@ -53,8 +55,8 @@ AccountDetailsModal.prototype.render = function () {
|
|||||||
h('div', {}, [
|
h('div', {}, [
|
||||||
h(QrView, {
|
h(QrView, {
|
||||||
Qr: {
|
Qr: {
|
||||||
message: this.props.selectedAddress,
|
message: this.props.selectedIdentity.name,
|
||||||
data: this.props.selectedIdentity,
|
data: this.props.selectedIdentity.address,
|
||||||
}
|
}
|
||||||
}, []),
|
}, []),
|
||||||
]),
|
]),
|
||||||
|
@ -10,11 +10,7 @@ module.exports = connect(mapStateToProps)(QrCodeView)
|
|||||||
|
|
||||||
function mapStateToProps (state) {
|
function mapStateToProps (state) {
|
||||||
return {
|
return {
|
||||||
// Qr: state.appState.Qr,
|
// Qr code is not fetched from state. 'message' and 'data' props are passed instead.
|
||||||
/*
|
|
||||||
Qr.message - address
|
|
||||||
Qr.data - identity
|
|
||||||
*/
|
|
||||||
buyView: state.appState.buyView,
|
buyView: state.appState.buyView,
|
||||||
warning: state.appState.warning,
|
warning: state.appState.warning,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user