Skip to content

Commit

Permalink
fix: merge version and health check (#662)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cafe137 committed Jun 5, 2024
1 parent 7f169bb commit cae90c1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/providers/Bee.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cae90c1

Please sign in to comment.