From cae90c1a82e16ee8c7908c43e2fd17f7130eb89d Mon Sep 17 00:00:00 2001 From: Cafe137 <77121044+Cafe137@users.noreply.github.com> Date: Tue, 4 Jun 2024 21:55:40 -0700 Subject: [PATCH] fix: merge version and health check (#662) --- src/providers/Bee.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/providers/Bee.tsx b/src/providers/Bee.tsx index 11336eb..c65d000 100644 --- a/src/providers/Bee.tsx +++ b/src/providers/Bee.tsx @@ -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