Skip to content
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

Fix prices.usd #6270

Merged
merged 4 commits into from
Jun 26, 2024
Merged

Fix prices.usd #6270

merged 4 commits into from
Jun 26, 2024

Conversation

jeff-dude
Copy link
Member

SELECT
  token_id,
  blockchain,
  symbol,
  contract_address,
  decimals
FROM
  prices_native.tokens
WHERE
  contract_address != 0x0000000000000000000000000000000000000000

returns no results, therefore drops all native tokens out of prices.usd

@jeff-dude jeff-dude requested review from aalan3 and 0xRobin June 26, 2024 14:31
Copy link
Contributor

@aalan3 aalan3 left a comment

Choose a reason for hiding this comment

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

Ah yeah contract_address can be null. Need to do DISTINCT FROM instead for these cases.

@0xRobin
Copy link
Collaborator

0xRobin commented Jun 26, 2024

this should do the trick.
Let's verify the CI output

@jeff-dude
Copy link
Member Author

sounds like you guys are on the same page for this approach. i need to get used to that function.

@jeff-dude
Copy link
Member Author

adding context, as users have reached out for support.

  • this PR was merged, due to an issue with an optimism token address (more info in description there)
  • the != approach caused all native tokens to drop out of prices.tokens, which feeds into prices.usd
  • rather than the above approach, the IS DISTINCT FROM function will help us get what we need

@jeff-dude
Copy link
Member Author

we have an ongoing bug in CI. for our sake here:

SELECT
  token_id,
  blockchain,
  symbol,
  contract_address,
  decimals
FROM
  prices_native.tokens
WHERE
  contract_address IS DISTINCT
FROM
  0x0000000000000000000000000000000000000000

this returns results as expected. i'm good to merge.

@jeff-dude jeff-dude merged commit b6e09a0 into main Jun 26, 2024
1 of 2 checks passed
@jeff-dude jeff-dude deleted the fix-prices branch June 26, 2024 14:51
@github-actions github-actions bot locked and limited conversation to collaborators Jun 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants