From 33a3830323ce93c0407bc4809ffd668e330fd967 Mon Sep 17 00:00:00 2001 From: Julien Lucca Date: Sat, 10 Oct 2026 19:17:55 +0200 Subject: [PATCH] feat(community): stamp last_tx/last_eos_account on updateCommunity (P2w W3b) The backend's new `communities_changed` AFTER UPDATE trigger (P2w W3a) notifies when `last_tx` changes, so the Wallet can confirm the signer's `cambiatus.cm::update` once it is indexed. This mirrors the stamps the sale and objective updaters already write. Replay-safe: re-indexing the same action writes the same values. DEPLOY ORDER: the columns come from the backend W3a migration. Ship this only after that migration is live; until then the update would fail and be swallowed by the existing catch, so community edits would silently not index. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017TeHsQCwWCBJzuob6cYEPo --- src/updaters/community.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/updaters/community.js b/src/updaters/community.js index 0e8f599..ad273de 100644 --- a/src/updaters/community.js +++ b/src/updaters/community.js @@ -143,7 +143,12 @@ async function updateCommunity (db, payload, blockInfo, context) { has_kyc: payload.data.has_kyc === 1, auto_invite: payload.data.auto_invite === 1, subdomain_id: subdomain.id, - website: payload.data.website === '' ? null : payload.data.website + website: payload.data.website === '' ? null : payload.data.website, + // Provenance for the backend's `communities_changed` trigger: it tells the + // Wallet whose signed `update` just landed. The columns come from the backend + // migration (P2w W3a), which must be live before this ships. + last_tx: payload.transactionId, + last_eos_account: payload.authorization[0].actor } // Find the community