diff options
refactor unused code
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/actions.js | 10 | ||||
-rw-r--r-- | ui/app/components/pages/confirm-add-token/confirm-add-token.component.js | 4 | ||||
-rw-r--r-- | ui/app/components/pages/confirm-add-token/confirm-add-token.container.js | 8 | ||||
-rw-r--r-- | ui/app/reducers/metamask.js | 1 |
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, |