mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-28 18:08:08 +00:00
fix flow error
This commit is contained in:
parent
f0d7de8aa1
commit
8c579a1580
@ -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 (
|
||||
<Notification
|
||||
type="error"
|
||||
title="Backend not connected"
|
||||
actions={
|
||||
[{
|
||||
label: "Try again",
|
||||
callback: async () => {
|
||||
await props.blockchainReconnect(discovery.network);
|
||||
}
|
||||
}]
|
||||
} />
|
||||
);
|
||||
} if (discovery.completed) {
|
||||
// case 5: account not found and discovery is completed
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user