diff --git a/CHANGELOG.md b/CHANGELOG.md index 750d26f87..f71b80436 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [[v2.29.0-beta.7]](https://github.com/multiversx/mx-sdk-dapp/pull/1082)] - 2024-03-15 +- [Prevent nextjs build issue](https://github.com/multiversx/mx-sdk-dapp/pull/1081) + ## [[v2.29.0-beta.6]](https://github.com/multiversx/mx-sdk-dapp/pull/1080)] - 2024-03-14 - [Fix web wallet URL construction on logout action](https://github.com/multiversx/mx-sdk-dapp/pull/1079) diff --git a/package.json b/package.json index 64e917aff..2ad80c762 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@multiversx/sdk-dapp", - "version": "2.29.0-beta.6", + "version": "2.29.0-beta.7", "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/UI/CopyButton/helpers/copyToClipboard.tsx b/src/UI/CopyButton/helpers/copyToClipboard.tsx index a82a86ed8..ac15147e9 100644 --- a/src/UI/CopyButton/helpers/copyToClipboard.tsx +++ b/src/UI/CopyButton/helpers/copyToClipboard.tsx @@ -1,3 +1,5 @@ +import { isWindowAvailable } from 'utils/isWindowAvailable'; + function fallbackCopyTextToClipboard(text: string) { let success = false; @@ -21,6 +23,10 @@ function fallbackCopyTextToClipboard(text: string) { } export async function copyTextToClipboard(text: string) { + if (!isWindowAvailable()) { + return false; + } + let success = false; if (!navigator.clipboard) { diff --git a/src/UI/extension/ExtensionLoginButton/ExtensionLoginButton.tsx b/src/UI/extension/ExtensionLoginButton/ExtensionLoginButton.tsx index 99e38b27e..8c244e6d9 100644 --- a/src/UI/extension/ExtensionLoginButton/ExtensionLoginButton.tsx +++ b/src/UI/extension/ExtensionLoginButton/ExtensionLoginButton.tsx @@ -9,6 +9,7 @@ import { withStyles, WithStylesImportType } from 'hocs/withStyles'; import { useExtensionLogin } from 'hooks/login/useExtensionLogin'; import { getIsNativeAuthSingingForbidden } from 'services/nativeAuth/helpers'; import { LoginButton } from 'UI/LoginButton/LoginButton'; +import { isWindowAvailable } from 'utils/isWindowAvailable'; import { OnProviderLoginType } from '../../../types'; import { WithClassnameType } from '../../types'; import { getIsExtensionAvailable } from '../helpers'; @@ -47,7 +48,8 @@ const ExtensionLoginButtonComponent: ( nativeAuth }); const disabledConnectButton = getIsNativeAuthSingingForbidden(token); - const isFirefox = navigator.userAgent.indexOf('Firefox') != -1; + const isFirefox = + isWindowAvailable() && navigator.userAgent.indexOf('Firefox') != -1; const classes = { wrapper: classNames( globalStyles?.btn,