Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/provision-darwin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ npm install -g ic-mops

# Install DFINITY SDK.
curl --location --output install-dfx.sh "https://raw.githubusercontent.com/dfinity/sdk/master/public/install-dfxvm.sh"
DFX_VERSION=${DFX_VERSION:=0.30.2} DFXVM_INIT_YES=true bash install-dfx.sh
DFX_VERSION=${DFX_VERSION:=0.31.0} DFXVM_INIT_YES=true bash install-dfx.sh
rm install-dfx.sh
echo "$HOME/Library/Application Support/org.dfinity.dfx/bin" >> $GITHUB_PATH
source "$HOME/Library/Application Support/org.dfinity.dfx/env"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/provision-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ npm install -g ic-mops

# Install DFINITY SDK.
wget --output-document install-dfx.sh "https://raw.githubusercontent.com/dfinity/sdk/master/public/install-dfxvm.sh"
DFX_VERSION=${DFX_VERSION:=0.30.2} DFXVM_INIT_YES=true bash install-dfx.sh
DFX_VERSION=${DFX_VERSION:=0.31.0} DFXVM_INIT_YES=true bash install-dfx.sh
rm install-dfx.sh
echo "$HOME/.local/share/dfx/bin" >>$GITHUB_PATH
source "$HOME/.local/share/dfx/env"
Expand Down
136 changes: 122 additions & 14 deletions motoko/internet_identity_integration/package-lock.json

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

6 changes: 2 additions & 4 deletions motoko/internet_identity_integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@
"generate": "dfx generate greet_backend"
},
"devDependencies": {
"@dfinity/agent": "^2.2.0",
"@dfinity/auth-client": "^2.2.0",
"@dfinity/candid": "^2.2.0",
"@dfinity/identity": "^2.2.0",
"@dfinity/principal": "^2.2.0",
"assert": "2.0.0",
"buffer": "6.0.3",
"copy-webpack-plugin": "^11.0.0",
Expand All @@ -32,7 +29,8 @@
"util": "0.12.4",
"webpack": "^5.76.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.8.1"
"webpack-dev-server": "^4.8.1",
"@icp-sdk/core": "~5.0.0"
},
"engines": {
"node": "^12 || ^14 || ^16 || ^18"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {createActor, greet_backend} from "../../declarations/greet_backend";
import {AuthClient} from "@dfinity/auth-client"
import {HttpAgent} from "@dfinity/agent";
import {HttpAgent} from "@icp-sdk/core/agent";

let actor = greet_backend;

Expand Down Expand Up @@ -49,7 +49,7 @@ loginButton.onclick = async (e) => {
// Using the identity obtained from the auth client, we can create an agent to interact with the IC.
const agent = new HttpAgent({identity});
// Using the interface description of our webapp, we create an actor that we use to call the service methods.
actor = createActor(process.env.GREET_BACKEND_CANISTER_ID, {
actor = createActor(process.env.CANISTER_ID_GREET_BACKEND, {
agent,
});

Expand Down
4 changes: 2 additions & 2 deletions motoko/internet_identity_integration/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function initCanisterEnv() {

return Object.entries(canisterConfig).reduce((prev, current) => {
const [canisterName, canisterDetails] = current;
prev[canisterName.toUpperCase() + "_CANISTER_ID"] =
prev["CANISTER_ID_" + canisterName.toUpperCase()] =
canisterDetails[network];
return prev;
}, {});
Expand All @@ -37,7 +37,7 @@ const canisterEnvVariables = initCanisterEnv();

const isDevelopment = process.env.NODE_ENV !== "production";

const internetIdentityUrl = network === "local" ? `http://${canisterEnvVariables["INTERNET_IDENTITY_CANISTER_ID"]}.localhost:4943/` : `https://identity.ic0.app`
const internetIdentityUrl = network === "local" ? `http://${canisterEnvVariables["CANISTER_ID_INTERNET_IDENTITY"]}.localhost:4943/` : `https://identity.ic0.app`

const frontendDirectory = "greet_frontend";

Expand Down
Loading
Loading