From e7cb9e54a5a530b7d058abf57553566696127576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Holm=20Gj=C3=B8rup?= Date: Tue, 20 Aug 2024 19:36:02 +0200 Subject: [PATCH] Use new proxy endpoint for mainnet --- packages/browser-wallet/CHANGELOG.md | 8 +++++++- packages/browser-wallet/package.json | 2 +- .../browser-wallet/src/popup/shared/utils/wallet-proxy.ts | 7 +------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/browser-wallet/CHANGELOG.md b/packages/browser-wallet/CHANGELOG.md index f249b771..aeecd8cb 100644 --- a/packages/browser-wallet/CHANGELOG.md +++ b/packages/browser-wallet/CHANGELOG.md @@ -1,10 +1,16 @@ # Changelog +## 1.6.4 + +### Fixed + +- Prepare for Company ID providers on Mainnet by using wallet proxy endpoint `/v2/ip_info`. + ## 1.6.3 ### Fixed -- Use new wallet proxy endpoint `/v2/ip_info` which includes Company ID Providers, as these are now removed from the `/v1/ip_info`. +- Use new wallet proxy endpoint `/v2/ip_info` on Testnet, which includes Company ID Providers, as these are now removed from the `/v1/ip_info`. ## 1.6.2 diff --git a/packages/browser-wallet/package.json b/packages/browser-wallet/package.json index c8139d34..9f5de51c 100644 --- a/packages/browser-wallet/package.json +++ b/packages/browser-wallet/package.json @@ -1,7 +1,7 @@ { "name": "@concordium/browser-wallet", "private": true, - "version": "1.6.3", + "version": "1.6.4", "description": "Browser extension wallet for the Concordium blockchain", "author": "Concordium Software", "license": "Apache-2.0", diff --git a/packages/browser-wallet/src/popup/shared/utils/wallet-proxy.ts b/packages/browser-wallet/src/popup/shared/utils/wallet-proxy.ts index 0721e29c..a51bbb8f 100644 --- a/packages/browser-wallet/src/popup/shared/utils/wallet-proxy.ts +++ b/packages/browser-wallet/src/popup/shared/utils/wallet-proxy.ts @@ -259,12 +259,7 @@ export async function getTransactions( } export async function getIdentityProviders(): Promise { - const currentNetwork = await storedCurrentNetwork.get(); - if (currentNetwork === undefined) { - throw new Error('Tried to access wallet proxy without a loaded network.'); - } - // Use the new endpoint for Testnet only, this logic can be simplified once Company ID as been released on mainnet. - const proxyPath = currentNetwork.name === 'Concordium Testnet' ? '/v2/ip_info' : '/v1/ip_info'; + const proxyPath = '/v2/ip_info'; const response = await (await getWalletProxy()).get(proxyPath); return response.data; }