Add account state lifecycle (active → expired)#984
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Updates to Preview Branch (worktree-960-account-state) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
gudnuf
reviewed
Apr 7, 2026
| BAT_MINT_RATE_LIMIT_EXCEEDED = 31004, | ||
| } | ||
|
|
||
| export function isExpiredOfferError( |
Contributor
There was a problem hiding this comment.
@orveth lets add some brief jsdoc to this to know what this is for and why it only cares about account where purpose is offer
0133571 to
4115563
Compare
443b49a to
cd64fa2
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
cd64fa2 to
c3c5fd4
Compare
orveth
added a commit
that referenced
this pull request
Apr 9, 2026
Adds offers section to gift cards page with offer discovery, detail view (balance, expiry, Fund/Pay), and redirect handling for send/receive/buy flows via getAccountHomePath. Cleaned from original branch to contain only offers-UI changes. Account-state lifecycle changes deferred to PR #984. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
c3c5fd4 to
4cfd00e
Compare
Contributor
orveth
added a commit
that referenced
this pull request
Apr 10, 2026
Adds offers section to gift cards page with offer discovery, detail view (balance, expiry, Fund/Pay), and redirect handling for send/receive/buy flows via getAccountHomePath. Cleaned from original branch to contain only offers-UI changes. Account-state lifecycle changes deferred to PR #984. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jbojcic1
approved these changes
Apr 10, 2026
Collaborator
jbojcic1
left a comment
There was a problem hiding this comment.
approving but lets also add a db constraint that account can't be the default if has expires_at set
Two triggers enforce from both directions: - Trigger on users: blocks setting an expiring account as default - Trigger on accounts: blocks adding expires_at to a default account Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two commits, the first is clean and just adds the state and cron job to transition to expired. The second commit tries to add error handling, but is still a wip and I still need to test it. I'm wondering if we should just review the first commit and worry about this error handling later so we can get the account state migration on next.
@jbojcic1 we talked in discord about keeping the keyset active after expiry which I think we should do. If we do that, then I think we can probably remove this error handling entirely
Full spec: #960