Skip to content

Add integration test for the sell endpoint updating the seller's key balance in the database after a confirmed sell #710

Description

@Chucks1093

Summary

After a confirmed sell the seller's key balance in the database should reflect the reduced amount. An integration test should execute a sell and confirm both the database record and the balance endpoint return the updated value.

Scope

  • Seed a wallet with a balance of 10 keys for a creator
  • Call the sell endpoint to sell 4 keys and await confirmation
  • Query the balance endpoint for that wallet and creator, assert balance is 6
  • Sell the remaining 6 keys and assert balance is 0
  • Assert the wallet is no longer returned in the key holder list after selling all keys

Acceptance Criteria

  • Balance 6 after selling 4 from 10
  • Balance 0 after selling the remaining 6
  • Wallet absent from holder list after selling all keys
  • Balance endpoint and database record are consistent after each sell

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

No one assigned

    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