Skip to content

Commit

Permalink
Merge pull request #491 from Concordium/use-ip-info-v2
Browse files Browse the repository at this point in the history
Use new wallet-proxy endpoint and prepare release of 1.6.3
  • Loading branch information
limemloh authored Aug 19, 2024
2 parents dfa3067 + 062262e commit e49ae1e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions packages/browser-wallet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 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`.

## 1.6.2

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion packages/browser-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@concordium/browser-wallet",
"private": true,
"version": "1.6.2",
"version": "1.6.3",
"description": "Browser extension wallet for the Concordium blockchain",
"author": "Concordium Software",
"license": "Apache-2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,12 @@ export async function getTransactions(
}

export async function getIdentityProviders(): Promise<IdentityProvider[]> {
const proxyPath = `/v1/ip_info`;
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 response = await (await getWalletProxy()).get(proxyPath);
return response.data;
}
Expand Down

0 comments on commit e49ae1e

Please sign in to comment.