diff --git a/packages/desktop/README.md b/packages/desktop/README.md index 404573d50a..34dd4aa1e4 100644 --- a/packages/desktop/README.md +++ b/packages/desktop/README.md @@ -4,7 +4,7 @@ The following **must** be installed on all platforms: -- [Node.js](https://nodejs.org/en/) 18.15.0+ +- [Node.js](https://nodejs.org/en/) 20.10.0+ - [Yarn](https://classic.yarnpkg.com/en/docs/install) - [Rust](https://www.rust-lang.org/tools/install) diff --git a/packages/desktop/components/ContactAddressCard.svelte b/packages/desktop/components/ContactAddressCard.svelte index 7c3cda58fc..19ad9e6a34 100644 --- a/packages/desktop/components/ContactAddressCard.svelte +++ b/packages/desktop/components/ContactAddressCard.svelte @@ -3,9 +3,9 @@ import { IContact, IContactAddress, IContactAddressMap, setSelectedContactNetworkAddress } from '@core/contact' import { localize } from '@core/i18n' import { resetLedgerPreparedOutput, resetShowInternalVerificationPopup } from '@core/ledger' - import { ExplorerEndpoint, getDefaultExplorerUrl, getNameFromNetworkId, NetworkId } from '@core/network' + import { ExplorerEndpoint, getExplorerUrl, getNameFromNetworkId, getNetwork, NetworkId } from '@core/network' import { Router } from '@core/router' - import { buildUrl, truncateString } from '@core/utils' + import { truncateString } from '@core/utils' import { SendFlowType, setSendFlowParameters, SubjectType } from '@core/wallet' import { closeDrawer } from '@desktop/auxiliary/drawer' import { openPopup, PopupId } from '@desktop/auxiliary/popup' @@ -21,11 +21,11 @@ export let contact: IContact export let contactAddressMap: IContactAddressMap - const explorer = getDefaultExplorerUrl(networkId, ExplorerEndpoint.Address) + const hasExplorer = !!getNetwork(networkId)?.explorerUrl function onExplorerClick(address: string): void { - const url = buildUrl({ origin: explorer.baseUrl, pathname: `${explorer.endpoint}/${address}` }) - openUrlInBrowser(url?.href) + const url = getExplorerUrl(networkId, ExplorerEndpoint.Address, address) + openUrlInBrowser(url) } function onQrCodeClick(contactAddress: IContactAddress): void { @@ -72,7 +72,7 @@