Skip to content

Commit

Permalink
bump agent-js
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyan-dfinity committed Sep 14, 2024
1 parent dcf906c commit c88ee95
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 87 deletions.
163 changes: 83 additions & 80 deletions tools/ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions tools/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"build": "webpack"
},
"devDependencies": {
"@dfinity/agent": "1.0.1",
"@dfinity/candid": "1.0.1",
"@dfinity/auth-client": "1.0.1",
"@dfinity/identity": "1.0.1",
"@dfinity/principal": "1.0.1",
"@dfinity/agent": "2.1.0",
"@dfinity/candid": "2.1.0",
"@dfinity/auth-client": "2.1.0",
"@dfinity/identity": "2.1.0",
"@dfinity/principal": "2.1.0",
"buffer": "6.0.3",
"copy-webpack-plugin": "^9.0.1",
"css-loader": "^6.8.1",
Expand Down
4 changes: 2 additions & 2 deletions tools/ui/src/candid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ const names: Record<number,string> = {};

function isKnownMainnet(agent: HttpAgent) {
// @ts-ignore
const hostname = agent._host.hostname;
const hostname = agent.host.hostname;
return hostname.endsWith('.icp0.io') || hostname.endsWith('.ic0.app');
}

export let authClient: AuthClient | undefined;

const agent = new HttpAgent();
const agent = HttpAgent.createSync();
if (!isKnownMainnet(agent)) {
agent.fetchRootKey();
}
Expand Down

0 comments on commit c88ee95

Please sign in to comment.