Compare commits

...
2 Commits
Author SHA1 Message Date
nabarun e24d697c6d Upgrade package version to 0.1.5 (#29)
Part of https://www.notion.so/Gentx-like-attestation-mechanism-to-add-validators-at-genesis-time-19da6b22d47280ecbf1fe657c241ff59

Reviewed-on: #29
Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Co-committed-by: Nabarun <nabarun@deepstacksoft.com>
2025-05-05 11:28:08 +00:00
nabarun f47850ebfa Fix cache headers for index html file (#28)
Part of <https://www.notion.so/Gentx-like-attestation-mechanism-to-add-validators-at-genesis-time-19da6b22d47280ecbf1fe657c241ff59>

- Use serve package for controlling separate cache headers for files

Reviewed-on: #28
Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Co-committed-by: Nabarun <nabarun@deepstacksoft.com>
2025-05-02 08:23:22 +00:00
6 changed files with 30 additions and 5 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "web-wallet",
"version": "0.1.4",
"version": "0.1.5",
"private": true,
"dependencies": {
"@cerc-io/registry-sdk": "^0.2.5",
+3 -1
View File
@@ -46,10 +46,12 @@ const useGetOrCreateAccounts = () => {
}
const accountsData = await getOrCreateAccountsForChain(event.data.chainId);
const accountsAddressList = accountsData.map(account => account.address);
console.log('Sending WALLET_ACCOUNTS_DATA accounts:', accountsAddressList);
sendMessage(
event.source as Window, 'WALLET_ACCOUNTS_DATA',
accountsData.map(account => account.address),
accountsAddressList,
event.origin
);
};
@@ -14,6 +14,7 @@ services:
command: ["bash", "/scripts/run.sh"]
volumes:
- ../config/app/run.sh:/scripts/run.sh
- ../config/app/serve.json:/app/serve.json
ports:
- "80"
healthcheck:
+2 -2
View File
@@ -28,5 +28,5 @@ 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
# Serve build dir with explicit config
serve -s -l 80 -c /app/serve.json /app/build
@@ -0,0 +1,22 @@
{
"headers": [
{
"source": "/index.html",
"headers": [
{
"key": "Cache-Control",
"value": "no-cache, must-revalidate"
}
]
},
{
"source": "/static/**/*.{js,css,png,jpg,jpeg,gif,svg,ico}",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=31536000, immutable"
}
]
}
]
}
@@ -33,7 +33,7 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
RUN mkdir -p /scripts
# Install simple web server for now (use nginx perhaps later)
RUN yarn global add http-server
RUN yarn global add serve
WORKDIR /app
COPY . .