Skip to content

Commit

Permalink
Bump agent-js and remove workaround for Candid UI (#514)
Browse files Browse the repository at this point in the history
* Bump agent-js and remove workaround

* Bump agent-js to 0.21.4
  • Loading branch information
rvanasa authored Jan 24, 2024
1 parent 6a0479e commit da60236
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 77 deletions.
141 changes: 72 additions & 69 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": "0.20.2",
"@dfinity/candid": "0.20.2",
"@dfinity/auth-client": "0.20.2",
"@dfinity/identity": "0.20.2",
"@dfinity/principal": "0.20.2",
"@dfinity/agent": "0.21.4",
"@dfinity/candid": "0.21.4",
"@dfinity/auth-client": "0.21.4",
"@dfinity/identity": "0.21.4",
"@dfinity/principal": "0.21.4",
"buffer": "6.0.3",
"copy-webpack-plugin": "^9.0.1",
"css-loader": "^6.8.1",
Expand Down
4 changes: 1 addition & 3 deletions tools/ui/src/candid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ function isKnownMainnet(agent: HttpAgent) {

export let authClient: AuthClient | undefined;

const agent = new HttpAgent({
host: window.location.host.replace(/^(localhost)(:\d+)?$/, '127.0.0.1$2')
});
const agent = new HttpAgent();
if (!isKnownMainnet(agent)) {
agent.fetchRootKey();
}
Expand Down

0 comments on commit da60236

Please sign in to comment.