Summary
The buy function must verify the attached XLM payment covers the full cost including fees before executing. Unit tests should confirm underpayment panics with the correct error and that the exact required amount succeeds.
Scope
- Test sending exactly the required amount (cost + fees) succeeds
- Test sending 1 stroop less than required panics with
insufficient_funds
- Test sending more than required succeeds and does not refund the excess (excess handled by caller)
- Test sending 0 XLM panics with
insufficient_funds
- Assert no supply change or event emitted on any panic
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
The buy function must verify the attached XLM payment covers the full cost including fees before executing. Unit tests should confirm underpayment panics with the correct error and that the exact required amount succeeds.
Scope
insufficient_fundsinsufficient_fundsAcceptance Criteria
insufficient_fundsinsufficient_fundsETA: 12 hours
Coordinate on Telegram