Skip to content

Conversation

@ovitrif
Copy link
Collaborator

@ovitrif ovitrif commented Jan 20, 2026

Fixes #680

Improves the UX of the Easter Egg gift code redemption flow by adding better logging, error handling, and validation.

Description

  • Add comprehensive logging throughout gift claim operations for better debugging
  • Fix amount=0 handling to allow backend validation instead of rejecting upfront
  • Improve error messages with full error chain context
  • Add operation guards to prevent duplicate claim attempts
  • Validate that channel funding transaction exists
  • Better error classification (Used/UsedUp/Error)

QA Notes

Test scenarios:

  1. Test with a valid gift code (happy path)
  2. Test with a gift code that has amount=0 in QR
  3. Test with an already-used gift code
  4. Test with an exhausted/depleted gift code
  5. Test in both liquidity scenarios (with/without existing channels)
  6. Monitor logs to verify detailed debug information is captured

Warning

⚠️ Code was not compiled or tested due to build permission constraints. Please run:

  • ./gradlew compileDevDebugKotlin to verify compilation
  • ./gradlew testDevDebugUnitTest to run tests
  • ./gradlew detekt to check for lint issues

- Add comprehensive logging for gift claim operations
- Fix amount=0 handling to proceed with backend validation
- Improve error messages with full error chain context
- Add operation guards to prevent duplicate claims
- Validate channel funding transaction exists
- Better error classification (Used/UsedUp/Error)

Co-authored-by: Ovi Trif <ovitrif@users.noreply.github.com>
@ovitrif ovitrif changed the title fix: improve gift code redemption flow fix: improve gift code flow Jan 20, 2026
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.

Easter Egg Marketing Campaign – Gift code flow behaves inconsistently

2 participants