Skip to content

Commit ae9e005

Browse files
authored
Merge pull request #126 from CodeGov-org/nathan/fix-ii-and-candid
fix: ii integration and governance canister candid
2 parents 3cd8ba6 + 2546197 commit ae9e005

File tree

11 files changed

+705
-165
lines changed

11 files changed

+705
-165
lines changed

scripts/canisters/governance.did

Lines changed: 700 additions & 109 deletions
Large diffs are not rendered by default.

src/backend/integration/src/tests/user_profile.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ describe('User Profile', () => {
4141
const res = await driver.actor.list_reviewer_profiles();
4242
const resOk = extractOkResponse(res);
4343

44-
expect(resOk).toEqual({
45-
profiles: [alice, bob],
46-
});
44+
expect(resOk.profiles).toBeArrayOfSize(2);
45+
expect(resOk.profiles).toContainEqual(alice);
46+
expect(resOk.profiles).toContainEqual(bob);
4747
});
4848
});
4949

src/frontend/src/.ic-assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"match": "**/*",
44
"headers": {
5-
"Content-Security-Policy": "default-src 'self'; connect-src 'self' https://icp-api.io; img-src 'self' https://icp0.io http://localhost; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; form-action 'self'; object-src 'none'; frame-ancestors 'none'; upgrade-insecure-requests; block-all-mixed-content",
5+
"Content-Security-Policy": "default-src 'self'; connect-src 'self' https://icp-api.io; img-src 'self' https://icp0.io http://localhost blob:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; form-action 'self'; object-src 'none'; frame-ancestors 'none'; upgrade-insecure-requests; block-all-mixed-content",
66
"Permissions-Policy": "accelerometer=(), ambient-light-sensor=(), autoplay=(), battery=(), camera=(), cross-origin-isolated=(), display-capture=(), document-domain=(), encrypted-media=(), execution-while-not-rendered=(), execution-while-out-of-viewport=(), fullscreen=(), geolocation=(), gyroscope=(), keyboard-map=(), magnetometer=(), microphone=(), midi=(), navigation-override=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), screen-wake-lock=(), sync-xhr=(), usb=(), web-share=(), xr-spatial-tracking=(), clipboard-read=(), clipboard-write=(), gamepad=(), speaker-selection=(), conversion-measurement=(), focus-without-user-activation=(), hid=(), idle-detection=(), interest-cohort=(), serial=(), sync-script=(), trust-token-redemption=(), window-placement=(), vertical-scroll=()",
77
"X-Frame-Options": "DENY",
88
"Referrer-Policy": "same-origin",

src/frontend/src/app/app.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export const APP_CONFIG: ApplicationConfig = {
2929
}),
3030
provideIcAuth({
3131
identityProvider: ENV.IDENTITY_PROVIDER,
32-
derivationOrigin: ENV.DERIVATION_ORIGIN,
3332
}),
3433
],
3534
};

src/frontend/src/environments/environment.common.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,9 @@ export const BACKEND_ORIGIN = IS_MAINNET
99
? `https://${CANISTER_ID_BACKEND}.icp0.io`
1010
: `http://${CANISTER_ID_BACKEND}.localhost:8080`;
1111

12-
export const CANISTER_ID_MARKETING = import.meta.CANISTER_ID_MARKETING ?? '';
13-
1412
export const CANISTER_ID_INTERNET_IDENTITY =
1513
import.meta.CANISTER_ID_INTERNET_IDENTITY ?? '';
1614

1715
export const IDENTITY_PROVIDER = IS_MAINNET
1816
? 'https://identity.ic0.app'
1917
: `http://${CANISTER_ID_INTERNET_IDENTITY}.localhost:8080`;
20-
21-
// don't use derivation origins locally because II rejects them as invalid
22-
// this can be enabled locally once II supports it
23-
// Use this value for local support: `http://${CANISTER_ID_MARKETING}.localhost:8000`;
24-
export const DERIVATION_ORIGIN = IS_MAINNET
25-
? `https://${CANISTER_ID_MARKETING}.icp0.io`
26-
: undefined;

src/frontend/src/environments/environment.development.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {
22
API_GATEWAY,
33
BACKEND_ORIGIN,
44
CANISTER_ID_BACKEND,
5-
DERIVATION_ORIGIN,
65
DFX_NETWORK,
76
IDENTITY_PROVIDER,
87
IS_MAINNET,
@@ -15,5 +14,4 @@ export const ENV = {
1514
DFX_NETWORK,
1615
IDENTITY_PROVIDER,
1716
IS_MAINNET,
18-
DERIVATION_ORIGIN,
1917
};

src/frontend/src/environments/environment.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {
22
API_GATEWAY,
33
BACKEND_ORIGIN,
44
CANISTER_ID_BACKEND,
5-
DERIVATION_ORIGIN,
65
DFX_NETWORK,
76
IDENTITY_PROVIDER,
87
IS_MAINNET,
@@ -15,5 +14,4 @@ export const ENV = {
1514
DFX_NETWORK,
1615
IDENTITY_PROVIDER,
1716
IS_MAINNET,
18-
DERIVATION_ORIGIN,
1917
};

src/frontend/src/typings.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
interface ImportMeta {
22
CANISTER_ID_BACKEND?: string;
3-
CANISTER_ID_MARKETING?: string;
43
CANISTER_ID_INTERNET_IDENTITY?: string;
54
DFX_NETWORK?: string;
65
}

src/marketing/generate-alt-origins.mjs

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/marketing/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"version": "0.0.1",
66
"scripts": {
77
"start": "astro dev",
8-
"build": "astro check && astro build && node ./generate-alt-origins.mjs"
8+
"build": "astro check && astro build"
99
},
1010
"dependencies": {
1111
"@astrojs/netlify": "^5.2.0",

0 commit comments

Comments
 (0)