Skip to content

Keep an unconfirmed identity top-up from Platform addresses pending across screen re-entry #6000

Open

Description

@romchornyi

An identity top-up from Platform addresses that ends unconfirmed (FFI code 20, StateTransitionResultUnconfirmed) may already have been delivered and must not be submitted again. Since #5860 the SwiftExampleApp TopUpIdentityView keeps that fact only in its own @State (isPending): after Done and re-entry a new view shows the form again, and the unconfirmed path reconciles no addresses, so the same top-up can be sent a second time while the first may still execute.

#5860 deliberately reverted a wallet-side address hold (67d0e66 reverting 56c4c11) and documents the same-nonce race instead, so this needs its own design:

  • Who owns the pending state: rs-platform-wallet's address top-up orchestration and WalletPersister (durable, shared by every host), or each host's view model.
  • When it clears: the next address sync that shows the inputs spent at or past the submitted nonces, or the identity balance grown.
  • Hosts then only query and display it, instead of preserving a library-owned do-not-retry rule themselves.

Found by a pre-push review of #5860.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions