-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
It looks like this contributor signed our Contributor License Agreement. 👍 Many thanks, Ethcore CLA Bot |
if (this.state.loading || !this.state.valid) return; | ||
|
||
return ( | ||
<div className={ styles['input-icon'] }> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe styles.inputIcon
may do the trick as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, no...
|
||
this.setState({ ...validation }); | ||
|
||
if (validation.valid) return this.props.onChange(true, value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure the linter doesn't complain here? (Single-line if)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it doesn't, but modified it.
@@ -185,13 +276,14 @@ export default class Token extends Component { | |||
} | |||
|
|||
onMetaLookup = () => { | |||
let query = this.state.metaQuery; | |||
let keyIndex = this.state.metaKeyIndex; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let vs const?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I always use const
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Unless we need to modify things. The best approach - just use const, if you assign something and it complains, let it :)
}) | ||
.then(data => { | ||
// If no total supply, must not be a proper token | ||
if (data.totalSupply === null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it come back at null or 0? May want to do a eth_getCode on the address first, no code found, not a contract
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, the getTokenTotalSupply
method is in fact doing just that, returning null
if no code, or not a token contract.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect.
Small fixes for issues #2195, #2198, #2193, #2197, #2196, #2194 ...