From 14cbf0f3c15eaa476d2b42e8754188328448b5f5 Mon Sep 17 00:00:00 2001 From: Frederik Rothenberger Date: Fri, 18 Oct 2024 15:48:29 +0200 Subject: [PATCH] Add dfx deps default init args (#2662) This PR adds default init args for the dfx deps feature. The arg will disable the captcha, as it is not needed in dev environments. --- scripts/build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/build b/scripts/build index 39e30470fd..672345da25 100755 --- a/scripts/build +++ b/scripts/build @@ -168,12 +168,15 @@ function build_canister() { asset_name="internet_identity_dev.wasm.gz" wasm_url="https://github.com/dfinity/internet-identity/releases/download/$release/$asset_name" wasm_hash_url="https://github.com/dfinity/internet-identity/releases/download/$release/$asset_name.sha256" + # init_arg that disables the captcha, appropriate for the dev build + init_arg="(opt record { captcha_config = opt record { max_unsolved_captchas= 50:nat64; captcha_trigger = variant {Static = variant {CaptchaDisabled}}}})" init_guide="Use '(null)' for sensible defaults. See the candid interface for more details." metadata_json=$(echo '{}' | jq -cMr \ --arg wasm_url "$wasm_url" \ --arg wasm_hash_url "$wasm_hash_url" \ + --arg init_arg "$init_arg" \ --arg init_guide "$init_guide" \ - '. | .pullable = { wasm_url: $wasm_url, wasm_hash_url: $wasm_hash_url, dependencies: [], init_guide: $init_guide} ') + '. | .pullable = { wasm_url: $wasm_url, wasm_hash_url: $wasm_hash_url, dependencies: [], init_arg: $init_arg, init_guide: $init_guide} ') ic-wasm "$canister.wasm" -o "$canister.wasm" metadata dfx -d "$metadata_json" -v public fi