From 8c579a158066ac09f2a6d3449d43232404b315ef Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Thu, 13 Sep 2018 19:20:44 +0200 Subject: [PATCH] fix flow error --- .../Wallet/components/SelectedAccount/index.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/views/Wallet/components/SelectedAccount/index.js b/src/views/Wallet/components/SelectedAccount/index.js index 259a9773..9067b6b1 100644 --- a/src/views/Wallet/components/SelectedAccount/index.js +++ b/src/views/Wallet/components/SelectedAccount/index.js @@ -33,6 +33,8 @@ const SelectedAccount = (props: Props) => { network } = accountState; + if (!network) return; // TODO: this shouldn't happen. change accountState reducer? + const blockchain = props.blockchain.find(b => b.name === network.network); if (blockchain && !blockchain.connected) { return ( @@ -77,21 +79,6 @@ const SelectedAccount = (props: Props) => { message="Connect device to load accounts" /> ); - } if (discovery.waitingForBlockchain) { - // case 4: backend is not working - return ( - { - await props.blockchainReconnect(discovery.network); - } - }] - } /> - ); } if (discovery.completed) { // case 5: account not found and discovery is completed return (