Repository navigation
fix(action-token): promise a count, not named tokens - #602
Merged
dadiorchen merged 1 commit intoSep 29, 2026
Merged
Conversation
A bundle link resolved tokens the moment it was created and wrote their ids into the link, throwing the requested number away. Nothing in the database marked those tokens, so an ordinary send could take them, and the link then died at claim with a 409 while the sender still held plenty of other tokens. A bundle link now carries the count. The tokens are chosen at claim time from whatever the sender wallet still holds, skipping ones already pending or claimed, so a send can no longer kill a link. Links that name their tokens are unchanged, which keeps the case for sharing specific tokens and keeps already issued links working. Selection happens on the model bound to the open transaction, not through TokenService, which opens a session of its own. Closes Greenstand#574 Closes Greenstand#571
dadiorchen
approved these changes
Sep 29, 2026
|
🎉 This PR is included in version 1.44.0-keycloak.37 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Closes #574
Closes #571
Problem
A bundle link resolved tokens at creation and wrote their ids into the link, throwing the requested number away. Nothing marked those tokens, so an ordinary send could take them, and the link then died at claim while the sender still held plenty of others.
Change
A bundle link carries
token_count, and the tokens are chosen at claim time from whatever the wallet still holds, skipping pending and claimed ones. Links that name their tokens are unchanged, so case 1 and already issued links keep workingTrade-off
The promise becomes best effort. Spending below the count gives a clear error at claim instead of a silently dead link. No database state added
Verification