Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed provider initialised check (#1008) #1009

Merged
merged 2 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/logout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down