aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/app/modals/qr-scanner/qr-scanner.component.js2
-rw-r--r--ui/app/pages/home/home.container.js2
-rw-r--r--ui/app/store/actions.js15
3 files changed, 12 insertions, 7 deletions
diff --git a/ui/app/components/app/modals/qr-scanner/qr-scanner.component.js b/ui/app/components/app/modals/qr-scanner/qr-scanner.component.js
index a83ba8f8e..cb8b07ff1 100644
--- a/ui/app/components/app/modals/qr-scanner/qr-scanner.component.js
+++ b/ui/app/components/app/modals/qr-scanner/qr-scanner.component.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { BrowserQRCodeReader } from '@zxing/library'
-import adapter from 'webrtc-adapter' // eslint-disable-line import/no-nodejs-modules, no-unused-vars
+import 'webrtc-adapter'
import Spinner from '../../../ui/spinner'
import WebcamUtils from '../../../../../lib/webcam-utils'
import PageContainerFooter from '../../../ui/page-container/page-container-footer/page-container-footer.component'
diff --git a/ui/app/pages/home/home.container.js b/ui/app/pages/home/home.container.js
index d0a5d7b47..7508654dc 100644
--- a/ui/app/pages/home/home.container.js
+++ b/ui/app/pages/home/home.container.js
@@ -3,7 +3,7 @@ import { compose } from 'recompose'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import { unconfirmedTransactionsCountSelector } from '../../selectors/confirm-transaction'
-``
+
const mapStateToProps = state => {
const { metamask, appState } = state
const {
diff --git a/ui/app/store/actions.js b/ui/app/store/actions.js
index c9e595421..634e6c058 100644
--- a/ui/app/store/actions.js
+++ b/ui/app/store/actions.js
@@ -1476,7 +1476,9 @@ function cancelAllTx (txsData) {
txsData.forEach((txData, i) => {
background.cancelTransaction(txData.id, () => {
dispatch(actions.completedTx(txData.id))
- i === txsData.length - 1 ? dispatch(actions.goHome()) : null
+ if (i === txsData.length - 1) {
+ dispatch(actions.goHome())
+ }
})
})
}
@@ -2394,18 +2396,21 @@ function reshowQrCode (data, coin) {
}
}
-function shapeShiftRequest (query, options, cb) {
+function shapeShiftRequest (query, options = {}, cb) {
var queryResponse, method
- !options ? options = {} : null
options.method ? method = options.method : method = 'GET'
var requestListner = function () {
try {
queryResponse = JSON.parse(this.responseText)
- cb ? cb(queryResponse) : null
+ if (cb) {
+ cb(queryResponse)
+ }
return queryResponse
} catch (e) {
- cb ? cb({error: e}) : null
+ if (cb) {
+ cb({error: e})
+ }
return e
}
}