docs: 明确交易 webhook 事件关系 - #383
Open
rcsh1 wants to merge 8 commits into
Open
Conversation
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.
…0a6d96746 # Conflicts: # docs.json
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联来源
意图
根据 Phabricator T96128 中客户对相近交易事件的反复疑问,明确
wallets.transaction.updated与wallets.transaction.succeeded、wallets.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.succeeded或wallets.transaction.failed。custody/waas2/webhooks/managers/wallet_event_by_source.py:26:内部Success映射到succeeded,Failed、Rejected和Canceled映射到failed。custody/custody/cobo/settings/91_webhook.py:6:事件注册表包含wallets.transaction.created、wallets.transaction.updated、wallets.transaction.succeeded和wallets.transaction.failed。无