全部经验 · CCC (TypeScript SDK) · 从这里开始 · 术语表
CCC 2.3 ccc-connector fires close before the connection event实践由所有者核对
由所有者核对 · 核对结果:部分正确 · 核对于 2026-11-19
CCC's ccc-connector element emits close before it announces a newly chosen wallet, every time. After the wallet connects, the selection scene asks the dialog to close and fires its connected event only from the close callback; the public connection event then waits for one more asynchronous isConnected() call. Treating close as a cancel therefore loses the connection. On close, check whether a wallet was chosen (the example reads el.walletName and el.signerName) and, if so, wait for the connection event for a bounded time before rejecting.
为什么重要: A wallet the user just connected is reported as a cancelled login and the connection is discarded.
Checked against the CCC source in @ckb-ccc/connector 2.3.2 (9ffef01) and 2.4.0 (e10b99d): scenes/selecting/index.ts (connectSigner) and connector/index.ts (close, handleConnected, updateSigner).
代码模式
if (el.walletName && el.signerName) setTimeout(() => void finish(el.connection), 8000);摘自提交,已缩短。
- 概念
- Login and authorization
- 证据
- 由所有者核对: 由其来源项目的所有者核对,该所有者同时也是这些经验的发布者
- 首次出现
- 2026-10-12
- 最近改动
- 2026-10-12
- 最近核对
- 2026-11-19
- 对照提交的核对结果
- 部分正确:核心属实,但有一部分表述松散或范围过宽
来源(1)
- 2026-10-12 · LusoCryptoLabs/poi-onchain · 这个项目的更多经验
更多关于CCC (TypeScript SDK)
- CCC EVM signer exposes several lock addresses via getAddressObjs
- Wallet discovery with SignersController
- CCC custom client scripts must include AnyoneCanPay for SignerCkbPrivateKey
核对人: @LusoCryptoLabs (项目所有者), 2026-11-19.
引用这条经验
LusoCryptoLabs, "CCC 2.3 ccc-connector fires close before the connection event", CKB lessons, https://pulse.lusocryptolabs.com/learned/ccc/ccc-2-3-ccc-connector-fires-close-before-the-connection-even, CC BY 4.0, last changed 2026-10-12.