fix: merge version and health check (#662)
This commit is contained in:
@@ -265,13 +265,15 @@ export function Provider({ children }: Props): ReactElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const promises = [
|
const promises = [
|
||||||
|
// API health
|
||||||
beeApi
|
beeApi
|
||||||
.getHealth({ timeout: TIMEOUT })
|
.getHealth({ timeout: TIMEOUT })
|
||||||
.then(response => setBeeVersion(response.version))
|
.then(response => setBeeVersion(response.version))
|
||||||
.catch(() => setBeeVersion(null)),
|
.then(() => setApiHealth(true))
|
||||||
|
.catch(() => {
|
||||||
// API health
|
setBeeVersion(null)
|
||||||
beeApi.isConnected({ timeout: TIMEOUT }).catch(() => setApiHealth(false)),
|
setApiHealth(false)
|
||||||
|
}),
|
||||||
|
|
||||||
// Node Addresses
|
// Node Addresses
|
||||||
beeApi
|
beeApi
|
||||||
|
|||||||
Reference in New Issue
Block a user