Todas as lições · CCC (TypeScript SDK) · Começa aqui · Glossário
CCC 2.3 ccc-connector fires close before the connection eventPráticoVerificada pelo dono
Verificada pelo dono · Verificação: em parte certa · Verificada em 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.
Porque importa: 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).
Padrão
if (el.walletName && el.signerName) setTimeout(() => void finish(el.connection), 8000);Tirado do commit, encurtado.
- Conceitos
- Login and authorization
- Evidência
- Verificada pelo dono: verificada pelo dono do projeto de onde veio, que também publica estas lições
- Vista pela primeira vez
- 2026-10-12
- Última mudança
- 2026-10-12
- Última verificação
- 2026-11-19
- Verificação contra o commit
- em parte certa: um núcleo verdadeiro, com uma parte solta ou demasiado larga
Fontes (1)
- 2026-10-12 · LusoCryptoLabs/poi-onchain · mais deste projeto
Mais sobre 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
Verificada por @LusoCryptoLabs (dono do projeto), 2026-11-19.
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
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.