Skip to content

Commit 00c8ad3

Browse files
committed
fix: merge version and health check
1 parent 7f169bb commit 00c8ad3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/providers/Bee.tsx

+6-4
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,15 @@ export function Provider({ children }: Props): ReactElement {
265265
}
266266

267267
const promises = [
268+
// API health
268269
beeApi
269270
.getHealth({ timeout: TIMEOUT })
270271
.then(response => setBeeVersion(response.version))
271-
.catch(() => setBeeVersion(null)),
272-
273-
// API health
274-
beeApi.isConnected({ timeout: TIMEOUT }).catch(() => setApiHealth(false)),
272+
.then(() => setApiHealth(true))
273+
.catch(() => {
274+
setBeeVersion(null)
275+
setApiHealth(false)
276+
}),
275277

276278
// Node Addresses
277279
beeApi

0 commit comments

Comments
 (0)