mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-12 12:47:14 +01:00
3b6e96bac9
* Update hide-token-confirmation-modal.js to use new modalState schema (added in 41e38fe55
).
* Fix modalState props
41 lines
946 B
JavaScript
41 lines
946 B
JavaScript
const Component = require('react').Component
|
|
const h = require('react-hyperscript')
|
|
const inherits = require('util').inherits
|
|
const connect = require('react-redux').connect
|
|
const actions = require('../../actions')
|
|
const QrView = require('../qr-code')
|
|
const AccountModalContainer = require('./account-modal-container')
|
|
|
|
function mapStateToProps (state) {
|
|
return {
|
|
Qr: state.appState.modal.modalState.props.Qr,
|
|
}
|
|
}
|
|
|
|
function mapDispatchToProps (dispatch) {
|
|
return {
|
|
hideModal: () => {
|
|
dispatch(actions.hideModal())
|
|
},
|
|
}
|
|
}
|
|
|
|
inherits(ShapeshiftDepositTxModal, Component)
|
|
function ShapeshiftDepositTxModal () {
|
|
Component.call(this)
|
|
|
|
}
|
|
|
|
module.exports = connect(mapStateToProps, mapDispatchToProps)(ShapeshiftDepositTxModal)
|
|
|
|
ShapeshiftDepositTxModal.prototype.render = function () {
|
|
const { Qr } = this.props
|
|
|
|
return h(AccountModalContainer, {
|
|
}, [
|
|
h('div', {}, [
|
|
h(QrView, {key: 'qr', Qr}),
|
|
]),
|
|
])
|
|
}
|