Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(economy): count every non-key reclaim failure as a failed send in the BLOCKED alert

nirholased90310a810d
diff --git a/api/cron/treasury-topup.js b/api/cron/treasury-topup.js
index fe0ddfc0b..f2998ea35 100644
--- a/api/cron/treasury-topup.js
+++ b/api/cron/treasury-topup.js
@@ -246,7 +246,11 @@ export default wrapCron(async (req, res) => {
// sends is what pointed the 2026-07-31 investigation at RPC health for an
// AES-GCM OperationError.
const undecryptable = failedSends.filter((f) => String(f?.reason || '').startsWith('secret_undecryptable'));
- const sendFailures = failedSends.filter((f) => f?.stage === 'send');
+ // Everything that is not a key problem is a send problem. Splitting on a
+ // `stage` field instead dropped legacy failure objects (which carry none)
+ // into neither bucket, and the alert then claimed "0 failed send(s)" while
+ // quoting a send error as its own sample.
+ const sendFailures = failedSends.filter((f) => !undecryptable.includes(f));
if (blocked) {
const strandedSol = undecryptable.reduce((s, f) => s + (Number(f?.sol) || 0), 0);
await sendOpsAlert(