fix: merge version and health check (#662)

This commit is contained in:
Cafe137
2024-06-04 21:55:40 -07:00
committed by GitHub
parent 7f169bbabd
commit cae90c1a82
+6 -4
View File
@@ -265,13 +265,15 @@ export function Provider({ children }: Props): ReactElement {
}
const promises = [
// API health
beeApi
.getHealth({ timeout: TIMEOUT })
.then(response => setBeeVersion(response.version))
.catch(() => setBeeVersion(null)),
// API health
beeApi.isConnected({ timeout: TIMEOUT }).catch(() => setApiHealth(false)),
.then(() => setApiHealth(true))
.catch(() => {
setBeeVersion(null)
setApiHealth(false)
}),
// Node Addresses
beeApi