Skip to content

Keep an unconfirmed key limits update pending across sheet re-entry #6063

Open

Description

@QuantumExplorer

Follow-up from #6054 (SwiftExampleApp key limits update).

Today: after a submission whose outcome is unknown, the Update Limits sheet locks submission only until it is closed. Two outcomes are unknown: a result of transactionBroadcastUnconfirmed, and a raise that was proved but whose key row failed to store (or any failure after which the wallet cannot confirm the key still has the reviewed limits). Reopening the sheet runs a proved refresh first and previews from chain state. A repeat signs an absolute total, so at worst it is refused as not a raise (40221, paid). It can never add the increment twice.

Wanted: the wallet remembers a pending update per (identity, key) across sheet reopenings and app restarts. The app shows it as pending, and offers no new update for that key, until a proved refresh settles it either way.

This is wallet-wide (any client of update_identity_key_limits_as_reviewed_with_external_signer), not specific to the iOS sheet.

Activity

  1. QuantumExplorer commented on Nov 22, 2026

    @QuantumExplorer
    MemberAuthor

    Also from #6054: a consensus refusal reaches the app from the broadcast responder's error metadata, without a proof. That is a third unproved outcome (besides transactionBroadcastUnconfirmed and a raise proved but not stored) that the pending record should cover. Today the sheet treats it as a refusal. If the update did land after all, a repeat signs the same absolute limits and is refused as not a raise (40221). It never adds twice.

  2. QuantumExplorer commented on Nov 22, 2026

    @QuantumExplorer
    MemberAuthor

    From #6054's review: the reviewed-update FFI maps three different outcomes to ErrorUnknown, all without a consensus code:

    • a stale preview refused before signing ("changed since they were reviewed; nothing was signed");
    • a proved raise that could not be applied locally (Persistence);
    • other failures after the broadcast.

    The sheet therefore locks on all of them. That is safe, but after a pre-send refusal it shows "could not confirm that this update did not land" when it could offer a fresh review.

    The pending-update record here should classify the outcome in Rust and marshal it through FFI:

    • refused before sending: review again;
    • reported refusal: the same preview can be offered again;
    • uncertain send;
    • proved but not applied locally.
  3. QuantumExplorer commented on Nov 22, 2026

    @QuantumExplorer
    MemberAuthor

    More pre-send failures that lock the Update Limits sheet today, all with no consensus code:

    • a failed nonce read;
    • a signer failure;
    • WalletRemovedBeforeSend, which the FFI maps to NotFound.

    Once Rust returns the disposition of the call, delete the Swift-side inference in KeyLimitsRetryGate (UpdateKeyLimitsView.swift).

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