Skip to content

docs: 明确交易 webhook 事件关系 - #383

Open
rcsh1 wants to merge 8 commits into
CoboGlobal:masterfrom
rcsh1:playbook/run-run_bce6f002111c4c10-alt-docs
Open

docs: 明确交易 webhook 事件关系#383
rcsh1 wants to merge 8 commits into
CoboGlobal:masterfrom
rcsh1:playbook/run-run_bce6f002111c4c10-alt-docs

Conversation

@rcsh1

@rcsh1 rcsh1 commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

关联来源

  • https://pha.1cobo.com/T96128
  • Aladdin 工单:1128876036453798224
  • Aladdin 工单:1126429538992722086
  • 关联 primary PR:(primary PR 未创建)

意图

根据 Phabricator T96128 中客户对相近交易事件的反复疑问,明确 wallets.transaction.updatedwallets.transaction.succeededwallets.transaction.failed 的重叠关系。说明仅订阅 wallets.transaction.updated 能观察生命周期进度,但不能将其当作提前入账信号;终态业务操作应使用专门的终态事件,并对重叠通知进行幂等处理。同步更新英文和中文文档,避免客户在多个相近事件之间凭猜测选择。

变更摘要

  • v2/guides/webhooks-callbacks/webhook-event-type.mdx:新增英文交易事件关系矩阵及订阅建议,明确终态流转会同时触发 wallets.transaction.updated 和对应终态事件,并链接既有顺序与重复投递说明。
  • v2_cn/guides/webhooks-callbacks/webhook-event-type.mdx:同步新增中文交易事件关系矩阵、终态业务处理建议和幂等处理说明,保持中英文行为描述一致。

代码证据

  • custody/waas2/webhooks/managers/wallet_event_by_source.py:139:每次已处理的交易状态流转都会尝试触发 wallets.transaction.updated
  • custody/waas2/webhooks/managers/wallet_event_by_source.py:145:终态流转还会额外尝试触发 wallets.transaction.succeededwallets.transaction.failed
  • custody/waas2/webhooks/managers/wallet_event_by_source.py:26:内部 Success 映射到 succeededFailedRejectedCanceled 映射到 failed
  • custody/custody/cobo/settings/91_webhook.py:6:事件注册表包含 wallets.transaction.createdwallets.transaction.updatedwallets.transaction.succeededwallets.transaction.failed

⚠️ 待确认事项

rcsh1 and others added 8 commits June 19, 2026 10:51
Reconstructed from ~/.workmate/playbook-traces/run_8d40a6d96746/events.jsonl
(25 captured Edit/Write ops replayed). Worktree was deleted on success
before the changes were committed; all real doc edits recovered intact.
- CN upgrade-guide.mdx: restore WaaS 2.0 API operation names to English
  (Create wallet, Create addresses in wallet, Transfer token, Speed up
  transaction, Drop transaction, Cancel transaction, Call smart contract,
  Sign message, List all transactions, Get transaction information)
- transfer-routing.mdx EN+CN: add note clarifying force_internal /
  force_external are mutually exclusive, and add JSON code examples
  showing force-Cobo-Loop, force-on-chain, and default routing
- status.mdx EN+CN: update FailedSignerTimeout remedy to specify retry
  operation by original transaction type (Transfer token / Call smart
  contract / Sign message) instead of always pointing to Transfer token

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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