Skip to content

forge-vesting — add test verifying cancel_and_claim() is rejected when schedule is paused #339

@Austinaminu2

Description

@Austinaminu2

Summary

cancel_and_claim() correctly checks if config.paused { return Err(VestingError::Paused); }. There is no test verifying this rejection. A paused schedule must not be atomically claimed and cancelled — the admin should unpause first to establish a clear vested amount.

Tasks

  • Initialize and advance past cliff
  • Call pause() as admin
  • Call cancel_and_claim() — assert Err(VestingError::Paused)
  • Verify no tokens have been transferred
  • Verify config.cancelled is still false
  • Unpause, then call cancel_and_claim() — assert success

Labels: testing, forge-vesting

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions