Skip to content

transactionSecurityStore has no tests: security-check state is uncovered #898

Description

@nanaf6203-bit

transactionSecurityStore has no tests: security-check state is uncovered

Labels / Complexity: testing · Medium Complexity — Medium

Problem

transactionSecurityStore (src/store/transactionSecurityStore.ts) tracks the security-check state of transactions (screening results, warnings). It has no tests. A regression that drops a warning or clears checks prematurely ships silently in the security flow.

Why this is architecturally hard

  1. Check states are the test design. Tests must pin the store across check progression (pending → clear / warning / blocked) and reset behavior.
  2. It feeds the security UI. The store's shape drives what TransactionSecuritySettings renders; tests assert the derived state consumers rely on.

Acceptance criteria

  • Tests cover check progression, warning/blocked results, and reset.
  • Tests run in CI via npm test.

Out of scope

The security utilities; other stores.

Getting started

  • src/store/transactionSecurityStore.ts — the store
  • src/store/__tests__/transactionStore.test.ts — the pattern

Commands: npm test.

Good first files to read: src/store/transactionSecurityStore.ts.

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions