Skip to content

platform-wallet: IdentityStatus is only half wired #5096

Description

@QuantumExplorer

IdentityStatus has five variants, but the library only ever sets two of them.

  • The variants (packages/rs-platform-wallet/src/wallet/identity/types/key_storage.rs) are Unknown, PendingCreation, Active, FailedCreation and NotFound. The type is public and the FFI persists it as a byte 0-4 (rs-platform-wallet-ffi/src/identity_persistence.rs, persistence.rs).
  • The library sets Active after loading or discovering an identity (network/loading.rs, network/discovery.rs) and otherwise leaves the default Unknown.
  • Registration (network/registration.rs) sets no status, so PendingCreation and FailedCreation never appear. Nothing sets NotFound when a previously active identity stops resolving.

The intended lifecycle (from the committed PLAN.md, removed in #5060, which marked this done) is Unknown -> PendingCreation -> Active, PendingCreation -> FailedCreation -> Active after a retry, and Active -> NotFound -> Active.

To do: either wire the missing transitions (registration submit, registration failure, identity not found on refresh) or remove the unused variants at the next API break. The FFI byte mapping must stay stable either way. #5060 documents the current behavior on the enum.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions