Skip to content

test(escrow): add test for remove_allowed_token last-token edge case#686

Merged
yahia008 merged 2 commits into
StellarCheckMate:mainfrom
D-Ochuko:feat/Add-Test-remove_allowed_token
May 28, 2026
Merged

test(escrow): add test for remove_allowed_token last-token edge case#686
yahia008 merged 2 commits into
StellarCheckMate:mainfrom
D-Ochuko:feat/Add-Test-remove_allowed_token

Conversation

@D-Ochuko
Copy link
Copy Markdown
Contributor

closes #623

  • Add to to track the number of allowlisted tokens
  • Update to increment the count (idempotent on re-add)
  • Implement (admin-only): removes the token from persistent storage, decrements the count, and sets to false when the last token is removed
  • Add test : adds one token, removes it, then asserts the AllowedToken entry is gone, AllowlistEnabled is false, and AllowedTokenCount is 0

- Add  to  to track the number of allowlisted tokens
- Update  to increment the count (idempotent on re-add)
- Implement  (admin-only): removes the token from
  persistent storage, decrements the count, and sets
  to false when the last token is removed
- Add test :
  adds one token, removes it, then asserts the AllowedToken entry is
  gone, AllowlistEnabled is false, and AllowedTokenCount is 0
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 28, 2026

@D-Ochuko Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@yahia008 yahia008 merged commit ab18b31 into StellarCheckMate:main May 28, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Test: remove_allowed_token handles removing the last listed token cleanly

2 participants