Skip to content

Add unit tests for distribute_dividend reverting when creator has zero total supply #487

Description

@Chucks1093

Summary

Distributing a dividend to a creator with zero total supply is meaningless and should revert to prevent XLM being locked in the contract with no holders to claim it.

Scope

  • Register a creator but do not buy any keys (total supply remains zero)
  • Attempt to call distribute_dividend and assert it reverts with a descriptive error
  • Assert no XLM was transferred from the caller

Acceptance Criteria

  • Distribution reverts when total supply is zero
  • Caller XLM balance unchanged after the revert
  • Error variant is descriptive and distinct from other error types

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

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