From 48789f2a3df2c820b61902fb49057f9f7b6cbd8c Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 15 Jun 2017 16:22:53 -0700 Subject: Add ability to add tokens to token list Fiex #1616 --- ui/app/add-token.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'ui/app/add-token.js') diff --git a/ui/app/add-token.js b/ui/app/add-token.js index fdbb5fe53..025cfacb5 100644 --- a/ui/app/add-token.js +++ b/ui/app/add-token.js @@ -30,10 +30,8 @@ function AddTokenScreen () { } AddTokenScreen.prototype.render = function () { - const props = this.props - const state = this.state - const { warning, address, symbol, decimals } = state + const { warning, symbol, decimals } = state return ( h('.flex-column.flex-grow', [ @@ -138,12 +136,12 @@ AddTokenScreen.prototype.render = function () { style: { alignSelf: 'center', }, - onClick (event) { + onClick: (event) => { const valid = this.validateInputs() if (!valid) return - const { address, symbol, decimals } = state - this.props.dispatch(addToken(address.trim(), symbol.trim(), decimals)) + const { address, symbol, decimals } = this.state + this.props.dispatch(actions.addToken(address.trim(), symbol.trim(), decimals)) }, }, 'Add'), ]), -- cgit