From 28afb414ee27624bae5cccdda26b86dc3ec22abd Mon Sep 17 00:00:00 2001 From: Arnaud Brousseau Date: Thu, 9 May 2024 00:13:02 -0500 Subject: [PATCH] Throw error when TURNKEY_SIGNER_ENCLAVE_QUORUM_PUBLIC_KEY is undefined --- export/index.template.html | 3 +++ import/index.template.html | 3 +++ import/standalone.template.html | 3 +++ 3 files changed, 9 insertions(+) diff --git a/export/index.template.html b/export/index.template.html index feea8dd..0180a09 100644 --- a/export/index.template.html +++ b/export/index.template.html @@ -336,6 +336,9 @@

Message log

"preprod": "04f3422b8afbe425d6ece77b8d2469954715a2ff273ab7ac89f1ed70e0a9325eaa1698b4351fd1b23734e65c0b6a86b62dd49d70b37c94606aac402cbd84353212" } const TURNKEY_SIGNER_ENCLAVE_QUORUM_PUBLIC_KEY = TURNKEY_SIGNERS_ENCLAVES["${TURNKEY_SIGNER_ENVIRONMENT}"]; + if (TURNKEY_SIGNER_ENCLAVE_QUORUM_PUBLIC_KEY === undefined) { + throw new Error("Configuration error: TURNKEY_SIGNER_ENCLAVE_QUORUM_PUBLIC_KEY is undefined") + } // todo(olivia): throw error if enclave quorum public is null once server changes are deployed if (enclaveQuorumPublic) { diff --git a/import/index.template.html b/import/index.template.html index 9372f7e..5d5f5c7 100644 --- a/import/index.template.html +++ b/import/index.template.html @@ -293,6 +293,9 @@ "preprod": "04f3422b8afbe425d6ece77b8d2469954715a2ff273ab7ac89f1ed70e0a9325eaa1698b4351fd1b23734e65c0b6a86b62dd49d70b37c94606aac402cbd84353212" } const TURNKEY_SIGNER_ENCLAVE_QUORUM_PUBLIC_KEY = TURNKEY_SIGNERS_ENCLAVES["${TURNKEY_SIGNER_ENVIRONMENT}"]; + if (TURNKEY_SIGNER_ENCLAVE_QUORUM_PUBLIC_KEY === undefined) { + throw new Error("Configuration error: TURNKEY_SIGNER_ENCLAVE_QUORUM_PUBLIC_KEY is undefined") + } // todo(olivia): throw error if enclave quorum public is null once server changes are deployed if (enclaveQuorumPublic) { diff --git a/import/standalone.template.html b/import/standalone.template.html index 89a9769..203ef76 100644 --- a/import/standalone.template.html +++ b/import/standalone.template.html @@ -345,6 +345,9 @@

Message log

"preprod": "04f3422b8afbe425d6ece77b8d2469954715a2ff273ab7ac89f1ed70e0a9325eaa1698b4351fd1b23734e65c0b6a86b62dd49d70b37c94606aac402cbd84353212" } const TURNKEY_SIGNER_ENCLAVE_QUORUM_PUBLIC_KEY = TURNKEY_SIGNERS_ENCLAVES["${TURNKEY_SIGNER_ENVIRONMENT}"]; + if (TURNKEY_SIGNER_ENCLAVE_QUORUM_PUBLIC_KEY === undefined) { + throw new Error("Configuration error: TURNKEY_SIGNER_ENCLAVE_QUORUM_PUBLIC_KEY is undefined") + } // todo(olivia): throw error if enclave quorum public is null once server changes are deployed if (enclaveQuorumPublic) {