Skip to content

Bind a passkey session to the contract and network it may commit to #390

Description

@karagozemin

Goal

Let a passkey commit a bid only to the contract id and network stored when the passkey session was created.

Why this is High

The passkey panel, the web config, and the SDK client can each be pointed at a different contract. A session opened against testnet must not sign a mainnet commit. The binding has to be checked at submit time.

Requirements

  • Record contract id, network passphrase, and account when the passkey session starts.
  • Refuse a commit when any of those differ from the current SDK client.
  • Surface a typed error in the panel instead of submitting.
  • Keep the secret seed out of the error and out of the demo trace.

Acceptance criteria

  • A matching session can commit in the fixture test.
  • A swapped contract id does not submit.
  • A swapped passphrase does not submit.
  • The error text does not contain the fixture seed.

Pointers

  • apps/web/src/components/PasskeyPanel.tsx
  • apps/web/src/passkey-config.ts
  • apps/web/src/lib/config.ts
  • packages/sdk/src/client.ts
  • packages/sdk/src/network.ts

Validation

  • Web config tests and an SDK network mismatch test

Drips

  • Drips Complexity: High
  • Expected Drips Points: 200
  • Add this issue from the Drips maintainer dashboard and set complexity to High.
  • Do not apply the Stellar Wave label on GitHub. That path defaults the issue to Trivial (100 points).

Activity

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssue proposed for the Drips Stellar Wave programarea: sdkTypeScript SDKarea: webWeb application and React integrationcomplexity: highExpected high implementation complexitydrips-candidateCandidate for a Drips Stellar Wave

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions