Skip to content

Add helper for computing expected key balance after mixed buy and sell sequence #342

@Chucks1093

Description

@Chucks1093

Summary
Test fixtures that assert key balances after a sequence of buys and sells inline the expected values as magic numbers. A helper that computes the expected balance from a list of buy and sell amounts makes the sequence intent clear and reduces maintenance.

Scope

  • add a test helper that takes an initial balance and a sequence of buy and sell amounts and returns the expected final balance
  • use the helper in at least one existing test that sequences multiple trades
  • keep the helper in the test module

Acceptance Criteria

  • the helper correctly computes the expected balance for any buy and sell sequence
  • at least one existing test is updated to use the helper
  • the helper handles mixed sequences of buys and sells in any order

Contributor coordination: if you pick this up, reach out in Telegram for updates or clarification: https://t.me/accesslayerorg

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type
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