From 657c39e5ede778a4cc94dc4408e9eadfa0570935 Mon Sep 17 00:00:00 2001 From: Nabarun Date: Fri, 25 Oct 2024 13:50:11 +0000 Subject: [PATCH] Add config for wallet connect verify code (#16) Part of [Service provider auctions for web deployments](https://www.notion.so/Service-provider-auctions-for-web-deployments-104a6b22d47280dbad51d28aa3a91d75) Reviewed-on: https://git.vdb.to/cerc-io/laconic-wallet-web/pulls/16 Co-authored-by: Nabarun Co-committed-by: Nabarun --- .../compose/docker-compose-laconic-wallet-web.yml | 1 + stack/stack-orchestrator/config/app/run.sh | 9 +++++++++ .../stack/laconic-wallet-web/README.md | 3 +++ 3 files changed, 13 insertions(+) diff --git a/stack/stack-orchestrator/compose/docker-compose-laconic-wallet-web.yml b/stack/stack-orchestrator/compose/docker-compose-laconic-wallet-web.yml index 90b154b..963c3e8 100644 --- a/stack/stack-orchestrator/compose/docker-compose-laconic-wallet-web.yml +++ b/stack/stack-orchestrator/compose/docker-compose-laconic-wallet-web.yml @@ -6,6 +6,7 @@ services: environment: CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} WALLET_CONNECT_ID: ${WALLET_CONNECT_ID} + WALLET_CONNECT_VERIFY_CODE: ${WALLET_CONNECT_VERIFY_CODE} CERC_DEFAULT_GAS_PRICE: ${CERC_DEFAULT_GAS_PRICE:-0.025} CERC_GAS_ADJUSTMENT: ${CERC_GAS_ADJUSTMENT:-2} CERC_LACONICD_RPC_URL: ${CERC_LACONICD_RPC_URL:-https://laconicd.laconic.com} diff --git a/stack/stack-orchestrator/config/app/run.sh b/stack/stack-orchestrator/config/app/run.sh index ae38f1c..77696fe 100755 --- a/stack/stack-orchestrator/config/app/run.sh +++ b/stack/stack-orchestrator/config/app/run.sh @@ -18,4 +18,13 @@ REACT_APP_GAS_ADJUSTMENT=$CERC_GAS_ADJUSTMENT \ REACT_APP_LACONICD_RPC_URL=$CERC_LACONICD_RPC_URL \ yarn build +# Define the directory and file path +FILE_PATH="/app/build/.well-known/walletconnect.txt" + +# Create the directory if it doesn't exist +mkdir -p "$(dirname "$FILE_PATH")" +# Write verification code to the file +echo "$WALLET_CONNECT_VERIFY_CODE" > "$FILE_PATH" + +# Serve build dir http-server --proxy http://localhost:80? -p 80 /app/build diff --git a/stack/stack-orchestrator/stack/laconic-wallet-web/README.md b/stack/stack-orchestrator/stack/laconic-wallet-web/README.md index 2f4b190..d44254f 100644 --- a/stack/stack-orchestrator/stack/laconic-wallet-web/README.md +++ b/stack/stack-orchestrator/stack/laconic-wallet-web/README.md @@ -51,6 +51,9 @@ Instructions for running the `laconic-wallet-web` using [laconic-so](https://git # Optional + # WalletConnect code for hostname verification + WALLET_CONNECT_VERIFY_CODE= + # Default gas price for txs (default: 0.025) CERC_DEFAULT_GAS_PRICE=