Skip to content

Add regression test for staked keys excluded from sell balance check #546

Description

@Chucks1093

Summary

A holder's staked keys must not be counted as available for selling. Attempting to sell an amount that would require dipping into staked keys should revert even if the total key balance (liquid + staked) is sufficient.

Scope

  • Give a wallet 10 keys: stake 6, leaving 4 liquid
  • Attempt to sell 5 keys and assert it reverts with insufficient liquid balance error
  • Assert selling exactly 4 keys succeeds

Acceptance Criteria

  • Sell of 5 reverts when only 4 liquid keys available
  • Sell of 4 succeeds using only liquid balance
  • Staked balance unchanged after both attempts

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions