Skip to content

Conversation

dxbr
Copy link

@dxbr dxbr commented Sep 15, 2025

Description

This update addresses a logic issue in subscription handling where revoked subscriptions without on-chain spend history were incorrectly treated as active.
The changes ensure that subscription revocations are properly respected, even when no spend has occurred, and improve test coverage to prevent regressions.

Summary

  • Extended getPermissionStatus to expose the isRevoked flag so callers can distinguish between unused and revoked permissions.
  • Hardened getSubscriptionStatus to mark revoked subscriptions as inactive, even when no on-chain spend history exists.
  • Added focused unit coverage for revocation scenarios and refreshed existing spend-permission tests to validate updated contract state logic.

Testing

  • yarn workspace @base-org/account typecheck
  • yarn workspace @base-org/account test getSubscriptionStatus
  • yarn workspace @base-org/account test prepareSpendCallData
  • yarn workspace @base-org/account test getPermissionStatus

Notes

All tests passed successfully.
This fix ensures subscription revocations are consistently respected, preventing false positives in account activity status.

@cb-heimdall
Copy link
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

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.

2 participants