Skip to content
This repository has been archived by the owner on Feb 9, 2025. It is now read-only.

Commit

Permalink
fix chai price v2 (#2086)
Browse files Browse the repository at this point in the history
  • Loading branch information
abrzezinski94 authored Jan 25, 2024
1 parent a0421b6 commit 596ea98
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions hooks/queries/jupiterPrice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,17 @@ export const useJupiterPricesByMintsQuery = (mints: PublicKey[]) => {
(acc, next) => ({ ...acc, ...next.data }),
{} as Response['data']
)

//override chai price if its broken
const chaiMint = '3jsFX1tx2Z8ewmamiwSU851GzyzM2DJMq7KWW5DM8Py3'
const chaiData = data[chaiMint]

if (chaiData?.price && (chaiData.price > 1.3 || chaiData.price < 0.9)) {
data[chaiMint] = {
...chaiData,
price: 1,
}
}
return data
},
onSuccess: (data) => {
Expand Down

1 comment on commit 596ea98

@vercel
Copy link

@vercel vercel bot commented on 596ea98 Jan 25, 2024

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

governance-ui – ./

governance-ui-git-main-solana-labs.vercel.app
governance-ui-solana-labs.vercel.app
app.realms.today

Please sign in to comment.