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(royalties): bind agent_id, status and source as SQL parameters in the accrual insert

nirholas6300ed2635ac
diff --git a/api/_lib/skill-royalty.js b/api/_lib/skill-royalty.js
index c30b0e712..d5fb77309 100644
--- a/api/_lib/skill-royalty.js
+++ b/api/_lib/skill-royalty.js
@@ -114,9 +114,9 @@ export async function accrueSkillCallRoyalty(opts) {
(skill_id, agent_id, author_user_id, price_usd, status,
settled_at, tx_hash, network, payer, source, platform_fee_usd)
VALUES
- (${skillId}, null, ${authorId}, ${split.authorUsd}, 'settled',
+ (${skillId}, ${null}, ${authorId}, ${split.authorUsd}, ${'settled'},
now(), ${opts.txHash ?? null}, ${opts.network ?? null},
- ${opts.payer ?? null}, 'x402', ${split.platformUsd})
+ ${opts.payer ?? null}, ${'x402'}, ${split.platformUsd})
RETURNING id
`;
return { ok: true, accrual: { ...split, ledgerId: row?.id ?? null } };