aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/modals/qr-scanner/qr-scanner.container.js
diff options
context:
space:
mode:
authorBruno Barbieri <bruno.barbieri@consensys.net>2018-08-11 01:40:06 +0800
committerGitHub <noreply@github.com>2018-08-11 01:40:06 +0800
commite2be22a4b722df608cb764042cc8ade6664414d8 (patch)
tree6a0c48ea06401ea8e06c14630edc7c0157f6e25c /ui/app/components/modals/qr-scanner/qr-scanner.container.js
parentbe1d5a7dd959f061b52f475bf8500b943ade786c (diff)
parentd0ccc59e459ecb41742b6e55a1875dfa2a2f9f87 (diff)
downloadtangerine-wallet-browser-e2be22a4b722df608cb764042cc8ade6664414d8.tar
tangerine-wallet-browser-e2be22a4b722df608cb764042cc8ade6664414d8.tar.gz
tangerine-wallet-browser-e2be22a4b722df608cb764042cc8ade6664414d8.tar.bz2
tangerine-wallet-browser-e2be22a4b722df608cb764042cc8ade6664414d8.tar.lz
tangerine-wallet-browser-e2be22a4b722df608cb764042cc8ade6664414d8.tar.xz
tangerine-wallet-browser-e2be22a4b722df608cb764042cc8ade6664414d8.tar.zst
tangerine-wallet-browser-e2be22a4b722df608cb764042cc8ade6664414d8.zip
Merge pull request #4897 from MetaMask/qr-code-scan
QR Code Scanner
Diffstat (limited to 'ui/app/components/modals/qr-scanner/qr-scanner.container.js')
-rw-r--r--ui/app/components/modals/qr-scanner/qr-scanner.container.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/ui/app/components/modals/qr-scanner/qr-scanner.container.js b/ui/app/components/modals/qr-scanner/qr-scanner.container.js
new file mode 100644
index 000000000..d0a35e03b
--- /dev/null
+++ b/ui/app/components/modals/qr-scanner/qr-scanner.container.js
@@ -0,0 +1,24 @@
+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)