Commit bbe6410a authored by Chi Kei Chan's avatar Chi Kei Chan

Check web3 for existence

parent f0ddff53
......@@ -112,7 +112,7 @@ class CurrencyInputPanel extends Component {
addExchange,
} = this.props;
if (web3.utils.isAddress(searchQuery)) {
if (web3 && web3.utils && web3.utils.isAddress(searchQuery)) {
const tokenAddress = searchQuery;
const { label } = selectors().getBalance(account, tokenAddress);
const factory = new web3.eth.Contract(FACTORY_ABI, factoryAddress);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment