diff --git a/hooks/useStakeRates.ts b/hooks/useStakeRates.ts index b80cab0..806f46c 100644 --- a/hooks/useStakeRates.ts +++ b/hooks/useStakeRates.ts @@ -11,7 +11,7 @@ const fetchRates = async () => { const outputMint = isUsdcBorrow ? USDC_MINT : SOL_MINT return fetchSwapChartPrices(t.mint_address, outputMint, '90') }) - const [jlpPrices, msolPrices, jitoPrices, bsolPrices] = + const [jlpPrices, msolPrices, jitoPrices, bsolPrices, jsolPrices] = await Promise.all(promises) // may be null if the price range cannot be calculated @@ -46,6 +46,11 @@ const fetchRates = async () => { bsolPrices[0].price } + if (jsolPrices && jsolPrices?.length > 1) { + rateData.jsol = + (4 * (jsolPrices[jsolPrices.length - 2].price - jsolPrices[0].price)) / + jsolPrices[0].price + } /* if (msolRange) { diff --git a/public/icons/jsol.svg b/public/icons/jsol.svg new file mode 100644 index 0000000..3208ecc --- /dev/null +++ b/public/icons/jsol.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/utils/constants.ts b/utils/constants.ts index d824f8e..76fffbc 100644 --- a/utils/constants.ts +++ b/utils/constants.ts @@ -52,6 +52,14 @@ export const STAKEABLE_TOKENS_DATA: { clientContext: 'lst', borrowToken: 'SOL', }, + { + name: 'JSOL', + id: 1063, + active: true, + mint_address: '7Q2afV64in6N6SeZsAAB81TJzwDoD6zpqmHkzi9Dcavn', + clientContext: 'lst', + borrowToken: 'SOL', + }, ] export type ClientContextKeys = 'lst' | 'jlp'