-
Notifications
You must be signed in to change notification settings - Fork 0
Add gift codes support #473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
jvsena42
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just missing some open comments
OBS: On the android repo, the business logic is centered in the repositories.
The methods are exposed to the ViewModels with the return wrapped in a Result class
0583e2b to
b376862
Compare
b376862 to
fdf7516
Compare
jvsena42
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worked on tests ✅
Found one last issue
ovitrif
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK & tested with all gift codes combinations.
pushed a few small edits.
Only having one uncertainty about the use of:
lightningRepo.executeWhenNodeRunning(
operationName = "claimGiftCode",
waitTimeout = waitTimeout,
) {
Result.success(Unit)
}.getOrThrow()If I understand correctly, we could change the body of BlocktankRepo.claimGiftCode so that everything that comes after this block could actually be passed inside the block.
Does it make sense to you?!
My understanding is that the purpose of the empty call with a simple Result success is because we want to wait for the node to init if not ready.
Pull Request Review: Gift Codes SupportThank you for this comprehensive implementation of gift codes functionality! Overall, the code is well-structured and follows good practices. Below are my findings and suggestions: ✅ Strengths
🐛 Potential Bugs & IssuesCritical
Moderate
🔒 Security Concerns
⚡ Performance Considerations
🧪 Test Coverage
📝 Code Quality Suggestions
🎯 Minor Improvements
✨ Overall AssessmentThis is a solid implementation with good architectural decisions. The main concerns are:
The code follows Kotlin best practices and integrates well with the existing codebase. Once the critical issues are addressed, this will be a robust feature. Review completed by Claude Code |
Added gift codes support.
In the demo:
Screen.Recording.2025-11-19.at.9.42.46.PM.mov
Commands to test with:
npx uri-scheme open "bitkit://gift-ben19112025-3000" --androidnpx uri-scheme open "bitkit://gift-notben19112025-3000" --androidEven when the app is closed, running one of the commands should make the app open and claim.
Can try a non existent code with:
npx uri-scheme open "bitkit://gift-x-3000" --androidCan try a code which has already been out of gifts with:
npx uri-scheme open "bitkit://gift-phil30102025-3000" --android