diff --git a/geth-poa/docker-compose.yml b/geth-poa/docker-compose.yml index f2cf3ab775..08caf8560b 100644 --- a/geth-poa/docker-compose.yml +++ b/geth-poa/docker-compose.yml @@ -279,6 +279,7 @@ services: environment: - NEXT_PUBLIC_WALLET_CONNECT_ID=${NEXT_PUBLIC_WALLET_CONNECT_ID} - SETTLEMENT_RPC_URL=${SETTLEMENT_RPC_URL} + - PUBLIC_SETTLEMENT_RPC_URL=${PUBLIC_SETTLEMENT_RPC_URL} networks: primev_net: ipv4_address: '172.29.0.90' diff --git a/geth-poa/frontend/entrypoint.sh b/geth-poa/frontend/entrypoint.sh index 16e5dcb710..aca3fc9a4d 100644 --- a/geth-poa/frontend/entrypoint.sh +++ b/geth-poa/frontend/entrypoint.sh @@ -7,8 +7,14 @@ SRC_TOKENS_PATH="/hyperlane-ui/src/consts/tokens.ts" HYP_NATIVE_ADDR=$(jq -r '.hypNativeAddress' $ARTIFACT_PATH) sed -i "/hypNativeAddress/c\ hypNativeAddress: \"$HYP_NATIVE_ADDR\"," $SRC_TOKENS_PATH +# Check if PUBLIC_SETTLEMENT_RPC_URL is set and non-empty, otherwise use SETTLEMENT_RPC_URL +if [ -n "${PUBLIC_SETTLEMENT_RPC_URL+x}" ] && [ -n "$PUBLIC_SETTLEMENT_RPC_URL" ]; then + RPC_URL="$PUBLIC_SETTLEMENT_RPC_URL" +else + RPC_URL="$SETTLEMENT_RPC_URL" +fi # Update src chains.ts file with L2 node url depending on dev vs prod SRC_CHAINS_PATH="/hyperlane-ui/src/consts/chains.ts" -sed -i "s|http: 'http://[^']*'|http: '$SETTLEMENT_RPC_URL'|g" "$SRC_CHAINS_PATH" +sed -i "s|http: 'http://[^']*'|http: '$RPC_URL'|g" "$SRC_CHAINS_PATH" exec yarn dev