Skip to content

Commit e49ae1e

Browse files
authored
Merge pull request #491 from Concordium/use-ip-info-v2
Use new wallet-proxy endpoint and prepare release of 1.6.3
2 parents dfa3067 + 062262e commit e49ae1e

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

packages/browser-wallet/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 1.6.3
4+
5+
### Fixed
6+
7+
- Use new wallet proxy endpoint `/v2/ip_info` which includes Company ID Providers, as these are now removed from the `/v1/ip_info`.
8+
39
## 1.6.2
410

511
### Fixed

packages/browser-wallet/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@concordium/browser-wallet",
33
"private": true,
4-
"version": "1.6.2",
4+
"version": "1.6.3",
55
"description": "Browser extension wallet for the Concordium blockchain",
66
"author": "Concordium Software",
77
"license": "Apache-2.0",

packages/browser-wallet/src/popup/shared/utils/wallet-proxy.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,12 @@ export async function getTransactions(
259259
}
260260

261261
export async function getIdentityProviders(): Promise<IdentityProvider[]> {
262-
const proxyPath = `/v1/ip_info`;
262+
const currentNetwork = await storedCurrentNetwork.get();
263+
if (currentNetwork === undefined) {
264+
throw new Error('Tried to access wallet proxy without a loaded network.');
265+
}
266+
// Use the new endpoint for Testnet only, this logic can be simplified once Company ID as been released on mainnet.
267+
const proxyPath = currentNetwork.name === 'Concordium Testnet' ? '/v2/ip_info' : '/v1/ip_info';
263268
const response = await (await getWalletProxy()).get(proxyPath);
264269
return response.data;
265270
}

0 commit comments

Comments
 (0)