This commit is contained in:
Adrian Brzeziński 2024-04-28 15:39:56 +02:00
parent afa08b17e7
commit 7151586050
3 changed files with 26 additions and 1 deletions

View File

@ -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) {

12
public/icons/jsol.svg Normal file
View File

@ -0,0 +1,12 @@
<svg width="300" height="300" viewBox="0 0 300 300" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="150" cy="150" r="150" fill="url(#paint0_linear_664:247)"/>
<circle cx="150" cy="150" r="150" fill="#ffd140"/>
<circle cx="150" cy="150" r="112.5" fill="white"/>
<path d="M147.75 216C138.875 216 130.687 214.375 123.187 211.125C115.813 207.75 109.75 203 105 196.875L121.875 176.625C129 186.25 137.125 191.062 146.25 191.062C158.625 191.062 164.812 183.812 164.812 169.312V106.875H118.688V82.5H195V167.625C195 183.75 191 195.875 183 204C175 212 163.25 216 147.75 216Z" fill="#100808"/>
<defs>
<linearGradient id="paint0_linear_664:247" x1="45" y1="18.75" x2="228.75" y2="281.25" gradientUnits="userSpaceOnUse">
<stop stop-color="#1BE4AF"/>
<stop offset="1" stop-color="#619CCC"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 824 B

View File

@ -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'