Skip to content

Add unit tests for the escrow deposit function rejecting amounts below the minimum investment floor #315

Description

@Chucks1093

Summary

The escrow deposit function should enforce a minimum investment amount to prevent dust deposits that waste ledger entries. Unit tests should confirm deposits below the minimum panic and deposits at or above the minimum succeed.

Scope

  • Test a deposit of exactly the minimum amount succeeds and is recorded in escrow state
  • Test a deposit of minimum - 1 stroop panics with amount_below_minimum
  • Test a deposit of 0 panics with zero_amount
  • Test a deposit well above the minimum succeeds
  • Assert escrow state unchanged after any panic

Acceptance Criteria

  • Deposit at minimum succeeds
  • Deposit below minimum panics with amount_below_minimum
  • Zero deposit panics with zero_amount
  • Escrow state unchanged after any panic

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions