Skip to content
Closed
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: 2 additions & 0 deletions web/src/components/wallet-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,5 @@ function isUserRejection(err: unknown): boolean {
m.includes("action_rejected")
);
}

.catch(err => console.error("Promise.all failed:", err));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== file exists and relevant snippet =="
wc -l web/src/components/wallet-widget.tsx || true
sed -n '240,275p' web/src/components/wallet-widget.tsx || true

echo "== parse with TypeScript compiler =="
node --version 2>/dev/null || true
if command -v bun >/dev/null 2>&1; then
  echo "bun available"
  bun x tsc --noEmit --skipLibCheck web/src/components/wallet-widget.tsx 2>&1 | sed -n '1,80p' || true
else
  echo "bun not available"
fi

echo "== static syntax probe =="
python3 - <<'PY'
import ast, re, pathlib
text = pathlib.Path("web/src/components/wallet-widget.tsx").read_text()
# TSX parse is unavailable here; check obvious detached member-call after semicolon context.
lines = text.splitlines()
for i,l in enumerate(lines, start=1):
    if ".catch(err => console.error(\"Promise.all failed:\", err));" in l:
        print(f"detached .catch at line {i}: {l.rstrip()}")
PY

Repository: AnkanMisra/MicroAI-Paygate

Length of output: 1193


Attach .catch to the Promise.all expression.

.catch(...) is a detached member call at the end of the file and is invalid TypeScript. Move it before the terminating semicolon, as a .catch(...) chain:

Suggested fix
-  Promise.all(...);
-  .catch(err => console.error("Promise.all failed:", err));
+  Promise.all(...).catch(err => console.error("Promise.all failed:", err));
🧰 Tools
🪛 Biome (2.5.6)

[error] 263-263: Expected a statement but instead found '.catch(err => console.error("Promise.all failed:", err))'.

(parse)

🪛 GitHub Actions: Web Lint & Build / 0_web-lint-build.txt

[error] 263-263: ESLint parsing error: Declaration or statement expected. The 'bun run lint' command failed with exit code 1.

🪛 GitHub Actions: Web Lint & Build / web-lint-build

[error] 263-263: ESLint parsing error: Declaration or statement expected. The 'bun run lint' command failed with exit code 1.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/src/components/wallet-widget.tsx` at line 263, Update the Promise.all
flow in the wallet widget so the catch handler is chained directly to the
Promise.all expression before its terminating semicolon; remove the detached
.catch call at the end of the file and preserve the existing console.error
handling.

Source: Linters/SAST tools

Loading