mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-29 10:28:08 +00:00
fix flow error
This commit is contained in:
parent
f0d7de8aa1
commit
8c579a1580
@ -33,6 +33,8 @@ const SelectedAccount = (props: Props) => {
|
|||||||
network
|
network
|
||||||
} = accountState;
|
} = accountState;
|
||||||
|
|
||||||
|
if (!network) return; // TODO: this shouldn't happen. change accountState reducer?
|
||||||
|
|
||||||
const blockchain = props.blockchain.find(b => b.name === network.network);
|
const blockchain = props.blockchain.find(b => b.name === network.network);
|
||||||
if (blockchain && !blockchain.connected) {
|
if (blockchain && !blockchain.connected) {
|
||||||
return (
|
return (
|
||||||
@ -77,21 +79,6 @@ const SelectedAccount = (props: Props) => {
|
|||||||
message="Connect device to load accounts"
|
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) {
|
} if (discovery.completed) {
|
||||||
// case 5: account not found and discovery is completed
|
// case 5: account not found and discovery is completed
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user