Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: npm

- run: npm ci
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20-slim AS build
FROM node:22-slim AS build

WORKDIR /app
COPY package.json package-lock.json ./
Expand All @@ -7,7 +7,7 @@ COPY . .
RUN npm run build
RUN npx esbuild tournament/server/server.ts --bundle --outfile=dist/server.js --platform=node --format=cjs --packages=external

FROM node:20-slim
FROM node:22-slim

WORKDIR /app
COPY package.json package-lock.json ./
Expand Down
18 changes: 17 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -740,17 +740,33 @@ <h3>Daily</h3>
diag('transfer.timeout',{txId});
status.innerHTML='Timed out. If UCT left your wallet, your balance will update on refresh. <button onclick="window.__forceReset()" style="text-decoration:underline;background:none;border:none;color:var(--cyan);cursor:pointer;font-size:11px">Reset wallet</button>';
status.style.color='var(--orange)';
// This poll gives up at 45*2s = 90s, but the ConnectClient's own intent
// timeout is 120s and the host's deadline is longer still — so 'timeout'
// here means the send is very likely STILL LIVE at the wallet, not dead.
// Re-enabling Transfer would offer a second payment for the same purchase.
// Leave it disabled; a reload is the honest way forward.
btn.disabled=true;
btn.textContent='Reload to continue';
return;
}else{
diag('transfer.failed',{txId,result,err:w.error});
const msg=w.error||'Transfer cancelled';
// Distinguish hard errors (insufficient balance, etc.) from a user-cancel.
// Red for errors that require action; muted gray for plain cancellation.
const isError=/insufficient|not connected|required|failed|error/i.test(msg);
const isError=/insufficient|not connected|required|failed|error|unknown/i.test(msg);
status.textContent=msg;
status.style.color=isError?'var(--red,#ef4444)':'var(--text3)';
status.style.fontSize=isError?'12px':'11px';
status.style.fontWeight=isError?'600':'400';
}
// INTENT_OUTCOME_UNKNOWN: the wallet had the payment and its fate is unknown.
// Re-enabling Transfer here is exactly the second spend the code must not
// invite — leave it disabled and make a reload the only way forward.
if(w.outcomeUnknown){
btn.disabled=true;
btn.textContent='Reload to continue';
return;
}
btn.disabled=false;
btn.textContent='Transfer';
});
Expand Down
Loading
Loading