Skip to content

Stamp last_tx/last_eos_account on updateCommunity (P2w W3b) - #77

Merged
lucca65 merged 1 commit into
masterfrom
feat/w3b-community-last-tx
Oct 10, 2026
Merged

lucca65 merged 1 commit into
masterfrom
feat/w3b-community-last-tx

Conversation

@lucca65

@lucca65 lucca65 commented Oct 10, 2026

Copy link
Copy Markdown
Member

DRAFT: do not merge or deploy until the backend P2w W3a migration (communities.last_tx / last_eos_account + the communities_changed trigger) is live in production.

Before that, the update fails on the missing columns. The existing .catch swallows the error, so community edits would silently stop indexing.

What

updateCommunity now also writes last_tx: payload.transactionId and last_eos_account: payload.authorization[0].actor, as the sale and objective updaters already do. The backend trigger fires on a last_tx change; DbListener then tells the signer's Wallet that its update landed.

Replay

Idempotent: re-indexing the same action writes the same values. A replayed old update emits one NOTIFY, and the backend ignores it because no pending tx matches.

Order

  1. Merge backend W3a.
  2. Deploy the backend (migration runs on boot).
  3. Merge and deploy this.
  4. Enable :wallet past admins.

Lint: standard ✅. There's no test suite in this repo; it gets a chain e2e on the local stack together with W3a.

🤖 Generated with Claude Code

https://claude.ai/code/session_017TeHsQCwWCBJzuob6cYEPo

…2w 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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017TeHsQCwWCBJzuob6cYEPo
@lucca65
lucca65 marked this pull request as ready for review October 10, 2026 18:40
@lucca65
lucca65 merged commit 94bb05f into master Oct 10, 2026
2 checks passed
@lucca65
lucca65 deleted the feat/w3b-community-last-tx branch October 10, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant