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
809 changes: 700 additions & 109 deletions scripts/canisters/governance.did

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/backend/integration/src/tests/user_profile.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ describe('User Profile', () => {
const res = await driver.actor.list_reviewer_profiles();
const resOk = extractOkResponse(res);

expect(resOk).toEqual({
profiles: [alice, bob],
});
expect(resOk.profiles).toBeArrayOfSize(2);
expect(resOk.profiles).toContainEqual(alice);
expect(resOk.profiles).toContainEqual(bob);
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/.ic-assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"match": "**/*",
"headers": {
"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",
"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",
"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=()",
"X-Frame-Options": "DENY",
"Referrer-Policy": "same-origin",
Expand Down
1 change: 0 additions & 1 deletion src/frontend/src/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const APP_CONFIG: ApplicationConfig = {
}),
provideIcAuth({
identityProvider: ENV.IDENTITY_PROVIDER,
derivationOrigin: ENV.DERIVATION_ORIGIN,
}),
],
};
9 changes: 0 additions & 9 deletions src/frontend/src/environments/environment.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,9 @@ export const BACKEND_ORIGIN = IS_MAINNET
? `https://${CANISTER_ID_BACKEND}.icp0.io`
: `http://${CANISTER_ID_BACKEND}.localhost:8080`;

export const CANISTER_ID_MARKETING = import.meta.CANISTER_ID_MARKETING ?? '';

export const CANISTER_ID_INTERNET_IDENTITY =
import.meta.CANISTER_ID_INTERNET_IDENTITY ?? '';

export const IDENTITY_PROVIDER = IS_MAINNET
? 'https://identity.ic0.app'
: `http://${CANISTER_ID_INTERNET_IDENTITY}.localhost:8080`;

// don't use derivation origins locally because II rejects them as invalid
// this can be enabled locally once II supports it
// Use this value for local support: `http://${CANISTER_ID_MARKETING}.localhost:8000`;
export const DERIVATION_ORIGIN = IS_MAINNET
? `https://${CANISTER_ID_MARKETING}.icp0.io`
: undefined;
2 changes: 0 additions & 2 deletions src/frontend/src/environments/environment.development.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
API_GATEWAY,
BACKEND_ORIGIN,
CANISTER_ID_BACKEND,
DERIVATION_ORIGIN,
DFX_NETWORK,
IDENTITY_PROVIDER,
IS_MAINNET,
Expand All @@ -15,5 +14,4 @@ export const ENV = {
DFX_NETWORK,
IDENTITY_PROVIDER,
IS_MAINNET,
DERIVATION_ORIGIN,
};
2 changes: 0 additions & 2 deletions src/frontend/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
API_GATEWAY,
BACKEND_ORIGIN,
CANISTER_ID_BACKEND,
DERIVATION_ORIGIN,
DFX_NETWORK,
IDENTITY_PROVIDER,
IS_MAINNET,
Expand All @@ -15,5 +14,4 @@ export const ENV = {
DFX_NETWORK,
IDENTITY_PROVIDER,
IS_MAINNET,
DERIVATION_ORIGIN,
};
1 change: 0 additions & 1 deletion src/frontend/src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
interface ImportMeta {
CANISTER_ID_BACKEND?: string;
CANISTER_ID_MARKETING?: string;
CANISTER_ID_INTERNET_IDENTITY?: string;
DFX_NETWORK?: string;
}
Expand Down
24 changes: 0 additions & 24 deletions src/marketing/generate-alt-origins.mjs

This file was deleted.

2 changes: 1 addition & 1 deletion src/marketing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": "0.0.1",
"scripts": {
"start": "astro dev",
"build": "astro check && astro build && node ./generate-alt-origins.mjs"
"build": "astro check && astro build"
},
"dependencies": {
"@astrojs/netlify": "^5.2.0",
Expand Down
12 changes: 0 additions & 12 deletions src/marketing/public/.ic-assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,5 @@
"X-XSS-Protection": "1; mode=block"
},
"allow_raw_access": false
},
{
"match": ".well-known",
"ignore": false
},
{
"match": ".well-known/ii-alternative-origins",
"headers": {
"Access-Control-Allow-Origin": "*",
"Content-Type": "application/json"
},
"ignore": false
}
]
Loading