mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-24 19:10:22 +01:00
25 lines
684 B
JavaScript
25 lines
684 B
JavaScript
import { connect } from 'react-redux'
|
|
import QrScanner from './qr-scanner.component'
|
|
|
|
const { hideModal, qrCodeDetected, showQrScanner } = require('../../../actions')
|
|
import {
|
|
SEND_ROUTE,
|
|
} from '../../../routes'
|
|
|
|
const mapStateToProps = state => {
|
|
return {
|
|
error: state.appState.modal.modalState.props.error,
|
|
errorType: state.appState.modal.modalState.props.errorType,
|
|
}
|
|
}
|
|
|
|
const mapDispatchToProps = dispatch => {
|
|
return {
|
|
hideModal: () => dispatch(hideModal()),
|
|
qrCodeDetected: (data) => dispatch(qrCodeDetected(data)),
|
|
scanQrCode: () => dispatch(showQrScanner(SEND_ROUTE)),
|
|
}
|
|
}
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(QrScanner)
|