From c24d0a557d79c9749717ab8fb359008365570dfb Mon Sep 17 00:00:00 2001 From: Razvan Tomegea Date: Thu, 4 Jan 2024 10:23:16 +0200 Subject: [PATCH] Fixed provider initialised check (#1008) * Fixed provider initialised check * 2.26.5 --- CHANGELOG.md | 3 +++ package.json | 2 +- src/utils/logout.ts | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a903ab61f..cc908c382 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [[v2.26.5]](https://github.com/multiversx/mx-sdk-dapp/pull/1009)] - 2024-01-04 +- [Fixed provider initialised check](https://github.com/multiversx/mx-sdk-dapp/pull/1008) + ## [[v2.26.4]](https://github.com/multiversx/mx-sdk-dapp/pull/1007)] - 2024-01-04 - [Prevent redirects on logout if the provider is both of wallet type and initialised](https://github.com/multiversx/mx-sdk-dapp/pull/1006) diff --git a/package.json b/package.json index 010257e8d..14aab118c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@multiversx/sdk-dapp", - "version": "2.26.4", + "version": "2.26.5", "description": "A library to hold the main logic for a dapp on the MultiversX blockchain", "author": "MultiversX", "license": "GPL-3.0-or-later", diff --git a/src/utils/logout.ts b/src/utils/logout.ts index e35435550..9de937f30 100644 --- a/src/utils/logout.ts +++ b/src/utils/logout.ts @@ -51,7 +51,7 @@ export async function logout( const provider = getAccountProvider(); const providerType = getProviderType(provider); const isWalletProvider = providerType === LoginMethodsEnum.wallet; - const isProviderInitialised = provider?.isInitialized?.() != null; + const isProviderInitialised = provider?.isInitialized?.() === true; if (shouldAttemptReLogin && provider?.relogin != null) { return provider.relogin();