aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
authorEsteban MIno <efmino@uc.cl>2018-08-08 07:12:16 +0800
committerEsteban MIno <efmino@uc.cl>2018-08-08 07:12:16 +0800
commit33357e3538b5157a852323d5f1e2db7f19b3303e (patch)
tree49a704bd6574d2e61c0e7803895234731dd549da /ui/app
parent15ea8c04b28a9f89999c96caf188d157e5230a55 (diff)
downloadtangerine-wallet-browser-33357e3538b5157a852323d5f1e2db7f19b3303e.tar
tangerine-wallet-browser-33357e3538b5157a852323d5f1e2db7f19b3303e.tar.gz
tangerine-wallet-browser-33357e3538b5157a852323d5f1e2db7f19b3303e.tar.bz2
tangerine-wallet-browser-33357e3538b5157a852323d5f1e2db7f19b3303e.tar.lz
tangerine-wallet-browser-33357e3538b5157a852323d5f1e2db7f19b3303e.tar.xz
tangerine-wallet-browser-33357e3538b5157a852323d5f1e2db7f19b3303e.tar.zst
tangerine-wallet-browser-33357e3538b5157a852323d5f1e2db7f19b3303e.zip
refactor unused code
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/actions.js10
-rw-r--r--ui/app/components/pages/confirm-add-token/confirm-add-token.component.js4
-rw-r--r--ui/app/components/pages/confirm-add-token/confirm-add-token.container.js8
-rw-r--r--ui/app/reducers/metamask.js1
4 files changed, 8 insertions, 15 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 5cc7dc2fa..d1168c168 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -1639,16 +1639,16 @@ function removeSuggestedTokens () {
}
}
-function clearPendingTokens () {
+function updateTokens (newTokens) {
return {
- type: actions.CLEAR_PENDING_TOKENS,
+ type: actions.UPDATE_TOKENS,
+ newTokens,
}
}
-function updateTokens (newTokens) {
+function clearPendingTokens () {
return {
- type: actions.UPDATE_TOKENS,
- newTokens,
+ type: actions.CLEAR_PENDING_TOKENS,
}
}
diff --git a/ui/app/components/pages/confirm-add-token/confirm-add-token.component.js b/ui/app/components/pages/confirm-add-token/confirm-add-token.component.js
index 0f27ceb53..65d654b92 100644
--- a/ui/app/components/pages/confirm-add-token/confirm-add-token.component.js
+++ b/ui/app/components/pages/confirm-add-token/confirm-add-token.component.js
@@ -90,9 +90,7 @@ export default class ConfirmAddToken extends Component {
type="default"
large
className="page-container__footer-button"
- onClick={() => {
- history.push(ADD_TOKEN_ROUTE)
- }}
+ onClick={() => history.push(ADD_TOKEN_ROUTE)}
>
{ this.context.t('back') }
</Button>
diff --git a/ui/app/components/pages/confirm-add-token/confirm-add-token.container.js b/ui/app/components/pages/confirm-add-token/confirm-add-token.container.js
index 500b406bb..0190024d9 100644
--- a/ui/app/components/pages/confirm-add-token/confirm-add-token.container.js
+++ b/ui/app/components/pages/confirm-add-token/confirm-add-token.container.js
@@ -1,16 +1,12 @@
import { connect } from 'react-redux'
import ConfirmAddToken from './confirm-add-token.component'
-const extend = require('xtend')
-
const { addTokens, clearPendingTokens } = require('../../../actions')
const mapStateToProps = ({ metamask }) => {
- const { pendingTokens, suggestedTokens } = metamask
- const params = extend(pendingTokens, suggestedTokens)
-
+ const { pendingTokens } = metamask
return {
- pendingTokens: params,
+ pendingTokens,
}
}
diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js
index 9e472bc6f..3f1d3394f 100644
--- a/ui/app/reducers/metamask.js
+++ b/ui/app/reducers/metamask.js
@@ -29,7 +29,6 @@ function reduceMetamask (state, action) {
tokenExchangeRates: {},
tokens: [],
pendingTokens: {},
- suggestedTokens: {},
send: {
gasLimit: null,
gasPrice: null,