Skip to content

Conversation

@schottra
Copy link
Contributor

Adds the column to track preferred coin flair mint and logic to use it for computing the badge on user records

  • null uses existing 'auto' logic
  • Empty string indicates 'none' and we return no badge even if you have or hold a coin
  • A valid mint string will prefer that coin if you hold a balance. Otherwise it falls back to the default logic.

Also adds the column to the response for the user to facilitate the edit profile flow.

Note: Needs an indexing change in the apps repo to actually set these. I've only tested via unit tests for now.

Copy link
Member

@raymondjacobson raymondjacobson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chill

JOIN artist_coins ON artist_coins.mint = sol_user_balances.mint -- ensure mapped in artist_coins
WHERE sol_user_balances.user_id = u.user_id
AND sol_user_balances.balance > 0
AND sol_user_balances.mint != '9LzCMqDgTKYz9Drzqnpgee3SGa89up3a247ypMj2xrqM' -- ignore prod wAUDIO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could do AND sol_user_balances.mint NOT IN ('9LzCMqDgTKYz9Drzqnpgee3SGa89up3a247ypMj2xrqM', 'BELGiMZQ34SDE6x2FUaML2UHDAgBLS64xvhXjX5tBBZo', 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZy4z6cQ')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sure I suppose I could. This was existing and I think each of them was added in incremental PRs 😅

@schottra schottra changed the title [PE-7202] Add support for preferred_coin_flair_mint on users [PE-7202] Add support for coin_flair_mint on users Oct 23, 2025
@schottra schottra merged commit 10611e7 into main Oct 23, 2025
5 checks passed
@schottra schottra deleted the badge-preferences branch October 23, 2025 15:04
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.

2 participants