Skip to content

fix: add COALESCE fallback to near_amount for older delegators#128

Merged
atomauro merged 1 commit intomainfrom
fix/vp-zero-fallback
Mar 4, 2026
Merged

fix: add COALESCE fallback to near_amount for older delegators#128
atomauro merged 1 commit intomainfrom
fix/vp-zero-fallback

Conversation

@atomauro
Copy link
Copy Markdown
Contributor

@atomauro atomauro commented Mar 4, 2026

Enhances the PR #126 addressing transactions that only emit ft_mint and no ft_burn event return a NULL near_amount, resulting in 0 VP.

This uses a COALESCE() block:

  1. It first attempts to grab the exact delta from ft_burn (This fixes the proxy inflation bug).
  2. If ft_burn doesn't exist in the receipt logs, it safely falls back to extracting the amount from the ft_mint event whose owner_id matches the final receiver.

@atomauro atomauro requested a review from corydickson March 4, 2026 19:08
@atomauro atomauro temporarily deployed to hos-development March 4, 2026 19:09 — with GitHub Actions Inactive
@atomauro atomauro requested a review from pedrohasf March 4, 2026 19:15
@atomauro atomauro self-assigned this Mar 4, 2026
@atomauro atomauro added the bug Something isn't working label Mar 4, 2026
@atomauro atomauro merged commit 3a0af60 into main Mar 4, 2026
2 checks passed
@atomauro atomauro deleted the fix/vp-zero-fallback branch March 4, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants