Todas as lições · Apps and UI · Começa aqui · Glossário
Saving local state after the first step of a multi-step flowPráticoDe uma correção
De uma correção · Verificação: verdadeira, mas a verificação achou-a mais geral do que a CKB · Verificada em 2026-11-19
In flows like Create followed by Arm, save local state right after the first transaction is sent. If you wait until the whole flow finishes, a failure in a later step leaves an on-chain object the user cannot find or cancel. Add the extra fields, such as the descriptor, once the later steps succeed.
Porque importa: If Arm fails after Create was sent, the user has an on-chain switch that does not appear in My switches and cannot be cancelled.
Padrão
remember() returned early unless the descriptor existed, so the switch was only saved after Arm. The fix calls remember() right after prepared.send() and adds the descriptor fields only when they are present.- Conceitos
- Transaction building and fees, Other
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-11-16
- Última mudança
- 2026-11-16
- Última verificação
- 2026-11-19
- Verificação contra o commit
- verdadeira, mas a verificação achou-a mais geral do que a CKB
Fontes (1)
- 2026-11-16 · psawyerberlin/dead-man-switch · mais deste projeto
Mais sobre Apps and UI
- Nervos DAO hold time with term-locked withdrawals
- Pinning JS codecs and derivations to Rust test vectors
- Pre-sign checkers must mirror every on-chain comparison
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Saving local state after the first step of a multi-step flow", CKB lessons, https://pulse.lusocryptolabs.com/learned/apps/saving-local-state-after-the-first-step-of-a-multi-step-flow, CC BY 4.0, last changed 2026-11-16.