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(agent-orders): require WALLET_ENCRYPTION_KEY before a live fill can retry forever

nirholas4843d48c100e
diff --git a/workers/agent-orders/config.js b/workers/agent-orders/config.js
index a66864ae1..3c1b56e20 100644
--- a/workers/agent-orders/config.js
+++ b/workers/agent-orders/config.js
@@ -45,6 +45,12 @@ export function loadConfig() {
if (mode === 'live' && !process.env.SOLANA_RPC_URL && !process.env.HELIUS_API_KEY) {
throw new Error('[agent-orders] live mode requires SOLANA_RPC_URL or HELIUS_API_KEY');
}
+ // Custodial agent keys are encrypted at rest under WALLET_ENCRYPTION_KEY
+ // (api/_lib/agent-wallet.js). Without it the decrypt silently falls back to
+ // JWT_SECRET, so every live fill dies at key recovery with a NON-terminal
+ // error and the order retries forever. Fail at boot instead. Simulate mode
+ // never touches the key (it stops before signing), so it does not need this.
+ if (mode === 'live') req('WALLET_ENCRYPTION_KEY');
return {
network,