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

Check web3 for existence

parent 2189ac92
......@@ -156,7 +156,7 @@ class CreateExchange extends Component {
const { isValid, errorMessage } = this.validate();
let label, decimals;
if (web3.utils.isAddress(tokenAddress)) {
if (web3 && web3.utils && web3.utils.isAddress(tokenAddress)) {
const { label: _label, decimals: _decimals } = selectors().getBalance(account, tokenAddress);
label = _label;
decimals = _decimals;
......
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