Skip to content

reader::get_account_orders and get_account_positions have zero test coverage #600

Description

@abayomicornelius

Problem

reader::get_account_orders (contracts/reader/src/lib.rs:674) and reader::get_account_positions (line 987) have zero test coverage anywhere in the repository:

grep -rn "get_account_orders\|get_account_positions" --include="*.rs" . | grep -v reader/src/lib.rs
# no output

Both are per-account aggregation views — the natural entry point for a wallet UI to list "my open orders" / "my open positions" — built on top of the same account-scoped key sets the (separately-flagged) pagination getters use.

Why it matters

A bug in either — e.g. returning another account's orders/positions, or silently dropping entries — would show a user someone else's data or hide their own, and nothing in the test suite currently exercises either function at all.

Suggested fix

Add a test with at least two accounts each holding orders/positions, asserting get_account_orders/get_account_positions for one account excludes the other account's entries and returns the complete, correctly-populated set for its own.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions