Skip to content

Add requests_by_payee read-only view #7

Description

@iexwr

Context

The frontend and backend need to list all requests created by a given payee. Currently there is only get_request(id); callers would have to scan all ids.

Acceptance criteria

  • Add requests_by_payee(payee: Address) -> Vec<u64> returning request ids where payee == payee.
  • Maintain the id list in storage, appending on create_request.
  • Covered by a unit test that creates two requests for the same payee and asserts both ids are returned.

Technical notes

  • Store a Vec<u64> of all ids under an instance key (sufficient for MVP).
  • Mind instance storage rent if the list grows large; persistent is an alternative.

Testing

  • make test green; make lint clean.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveStellar Wave for StackPayenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions