This commit is contained in:
Adrian Brzeziński 2024-06-05 13:03:20 +03:00
parent c5d799b6fc
commit 90f6fd0357
6 changed files with 1895 additions and 57 deletions

View File

@ -22,7 +22,7 @@ import ButtonGroup from './forms/ButtonGroup'
const set = mangoStore.getState().set
export const SOL_YIELD = ['bSOL', 'MSOL', 'JitoSOL', 'JSOL', 'INF']
export const SOL_YIELD = ['bSOL', 'MSOL', 'JitoSOL', 'JSOL', 'INF', 'hubSOL']
const USDC_YIELD = ['JLP', 'USDC']
const Stake = () => {

View File

@ -18,6 +18,7 @@ const fetchRates = async () => {
bsolPrices,
jsolPrices,
infPrices,
hubSOLPrices,
] = await Promise.all(promises)
// may be null if the price range cannot be calculated
@ -62,6 +63,13 @@ const fetchRates = async () => {
(4 * (infPrices[infPrices.length - 2].price - infPrices[0].price)) /
infPrices[0].price
}
if (hubSOLPrices && hubSOLPrices?.length > 1) {
rateData.hubsol =
(4 *
(hubSOLPrices[hubSOLPrices.length - 2].price -
hubSOLPrices[0].price)) /
hubSOLPrices[0].price
}
/*
if (msolRange) {

View File

@ -36,8 +36,8 @@
},
"dependencies": {
"@blockworks-foundation/mango-feeds": "0.1.7",
"@blockworks-foundation/mango-v4": "0.26.0",
"@blockworks-foundation/mango-v4-settings": "0.14.22",
"@blockworks-foundation/mango-v4": "0.30.0",
"@blockworks-foundation/mango-v4-settings": "0.14.24",
"@glitchful-dev/sol-apy-sdk": "3.0.2",
"@headlessui/react": "1.6.6",
"@heroicons/react": "2.0.10",

13
public/icons/hubsol.svg Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="500px" height="500px" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd" xmlns:xlink="http://www.w3.org/1999/xlink">
<g><path style="opacity:1" fill="#9b3678" d="M -0.5,-0.5 C 166.167,-0.5 332.833,-0.5 499.5,-0.5C 499.5,166.167 499.5,332.833 499.5,499.5C 332.833,499.5 166.167,499.5 -0.5,499.5C -0.5,332.833 -0.5,166.167 -0.5,-0.5 Z"/></g>
<g><path style="opacity:1" fill="#fefefe" d="M 226.5,46.5 C 287.114,41.8054 340.447,58.9721 386.5,98C 393.032,104.198 399.199,110.698 405,117.5C 407.368,123.817 406.701,129.817 403,135.5C 396.717,142.789 389.551,148.956 381.5,154C 376.889,155.007 372.555,154.34 368.5,152C 315.478,97.2615 253.478,83.9281 182.5,112C 162.283,121.875 144.616,135.208 129.5,152C 124.317,154.815 118.984,155.148 113.5,153C 106.698,147.199 100.198,141.032 94,134.5C 90.7281,128.139 90.7281,121.806 94,115.5C 129.938,76.7801 174.105,53.7801 226.5,46.5 Z"/></g>
<g><path style="opacity:1" fill="#c285ad" d="M 232.5,121.5 C 288.958,117.812 332.458,139.479 363,186.5C 385.954,230.031 386.288,273.698 364,317.5C 329.411,371.828 280.244,392.994 216.5,381C 162.784,364.949 130.284,329.449 119,274.5C 111.968,215.856 133.135,170.689 182.5,139C 198.212,130.042 214.879,124.209 232.5,121.5 Z"/></g>
<g><path style="opacity:1" fill="#9b3778" d="M 239.5,149.5 C 282.037,148.182 314.871,165.182 338,200.5C 359.55,241.169 356.883,280.169 330,317.5C 300.892,350.535 264.725,362.369 221.5,353C 185.403,341.903 161.57,318.403 150,282.5C 138.174,233.022 153.007,193.856 194.5,165C 208.646,156.897 223.646,151.73 239.5,149.5 Z"/></g>
<g><path style="opacity:1" fill="#fefefe" d="M 62.5,176.5 C 74.8531,176.672 86.5197,179.505 97.5,185C 102.15,189.574 103.65,195.074 102,201.5C 84.1939,266.729 99.6939,322.562 148.5,369C 169.537,386.517 193.537,398.184 220.5,404C 229.177,408.19 232.343,415.024 230,424.5C 228.489,430.877 226.823,437.21 225,443.5C 221.802,450.106 216.469,453.439 209,453.5C 139.594,437.423 89.9271,397.09 60,332.5C 40.6792,284.683 38.3458,236.016 53,186.5C 55.0223,181.98 58.189,178.647 62.5,176.5 Z"/></g>
<g><path style="opacity:1" fill="#fefefe" d="M 423.5,176.5 C 431.815,174.745 438.648,177.079 444,183.5C 467.189,258.217 454.189,325.884 405,386.5C 374.682,420.584 337.182,442.751 292.5,453C 280.901,454.272 274.068,449.106 272,437.5C 270.419,431.344 268.919,425.177 267.5,419C 268.073,411.756 271.74,406.756 278.5,404C 352.157,385.012 393.99,337.845 404,262.5C 405.445,242.059 403.112,222.059 397,202.5C 394.754,193.499 397.587,186.666 405.5,182C 411.775,180.627 417.775,178.794 423.5,176.5 Z"/></g>
<g><path style="opacity:1" fill="#fdfbfc" d="M 208.5,204.5 C 240.168,204.333 271.835,204.5 303.5,205C 305.223,205.775 306.223,207.108 306.5,209C 300.823,215.676 294.823,222.01 288.5,228C 257.167,228.667 225.833,228.667 194.5,228C 192.556,225.847 192.056,223.347 193,220.5C 198.37,215.298 203.536,209.965 208.5,204.5 Z"/></g>
<g><path style="opacity:1" fill="#fefefe" d="M 194.5,240.5 C 226.168,240.333 257.835,240.5 289.5,241C 295.749,246.744 301.416,252.911 306.5,259.5C 306.471,261.029 305.804,262.196 304.5,263C 272.5,263.667 240.5,263.667 208.5,263C 203.333,257.833 198.167,252.667 193,247.5C 192.167,244.829 192.667,242.496 194.5,240.5 Z"/></g>
<g><path style="opacity:1" fill="#fefefe" d="M 208.5,276.5 C 240.502,276.333 272.502,276.5 304.5,277C 305.804,277.804 306.471,278.971 306.5,280.5C 301.416,287.089 295.749,293.256 289.5,299C 257.833,299.667 226.167,299.667 194.5,299C 192.604,297.192 192.104,295.025 193,292.5C 198.37,287.298 203.536,281.965 208.5,276.5 Z"/></g>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -68,6 +68,14 @@ export const STAKEABLE_TOKENS_DATA: {
clientContext: 'lst',
borrowToken: 'SOL',
},
{
name: 'hubSOL',
id: 1153,
active: true,
mint_address: 'HUBsveNpjo5pWqNkH57QzxjQASdTVXcSK7bVKTSZtcSX',
clientContext: 'lst',
borrowToken: 'SOL',
},
]
export type ClientContextKeys = 'lst' | 'jlp'
@ -234,6 +242,7 @@ export const CUSTOM_TOKEN_ICONS: { [key: string]: boolean } = {
wbtcpo: true,
'wbtc (portal)': true,
inf: true,
hubsol: true,
}
export const DEFAULT_FAVORITE_MKTS = [

1916
yarn.lock

File diff suppressed because it is too large Load Diff