From b07304c67916812efd7d2d188ad118f3abfbec4a Mon Sep 17 00:00:00 2001 From: William Liu Date: Fri, 19 Jul 2024 01:00:41 +0000 Subject: [PATCH 1/3] feat: add more aerodrome vaults --- data/icons/klima.png | Bin 0 -> 3484 bytes data/icons/spot.png | Bin 0 -> 1475 bytes data/icons/wels.png | Bin 0 -> 1704 bytes data/mainnet/addresses.json | 31 ++++++++ data/mainnet/pools.js | 100 +++++++++++++++++++++++++ data/mainnet/tokens.js | 141 ++++++++++++++++++++++++++++++++++++ src/lib/third-party/lido.js | 32 ++++---- 7 files changed, 289 insertions(+), 15 deletions(-) create mode 100644 data/icons/klima.png create mode 100644 data/icons/spot.png create mode 100644 data/icons/wels.png diff --git a/data/icons/klima.png b/data/icons/klima.png new file mode 100644 index 0000000000000000000000000000000000000000..eebf61c83e50fea2bab71bb2ad800db1d137f416 GIT binary patch literal 3484 zcmZ{nc{J4j_s8G1#x{1P5hh#6PK@!v2+1B2C1Y2X36aP$V?r8hq!ih*WGq=ql4ZgS z6OnvIMlnMQjb-dx_|EsA-#NcOzOUE0_j%6ip2vOtaqoSd^Llv6-V)3U;ROHyY<1Dx ziKU4D8uu}l#|MT_u>|US(a8<~?kNHQCJ6xcSVx$70Jx(G0Drsy0GbER!Qu#IgmuoAW6xPWCYSGS~WP#a)QAqS)n<8P4>d77^?io+bZ0r4N^p& zgk(!m&wnud@V)u@Qqi*UZdmNy8#iu5-3@TfN^+*S=uEyFURv*(D~ug7+U_2Pk&~A- z`OV1d*UfuHg!vFI5iXzA2EIOg$a8?^KvXyh3oCOJV1hAfgkJ=>7sA|{3vedD!j8eX z+W8APkgYbyNS)8&YBJgR7RnX@+wW0}}jri4dc0&tF90y{Qz zee>Q9XwEQ5maFqvTyJ<`4<+brFsk80{AqqOSC{S7{+EOd*{|oa^2&TvCV786ncID} zvTtIWBX1H4Bze1Cp$Mk+_Yn5@D%NZOAED?o(9RXKhEpmSRE$#v=9)}5r&yGy2TXenvQ_qnzNE5nK* zmQKmX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#-q9oy~6cMHVPH z7`gc8oWF<4(NMfCAb7!XBQLq_>c0r1;eGGbbytnwE#vCdY;m^c#wYt$*ILL5Ryj|t zE95LjBIlf@-shL&!E|Bz>z7K;uhkypBt85ITa7;w3V2Od;KAZ$WqAVJX=ZP))wMj{ zexiDjtvdoyi#IHY@2)_|YM0^#Ib_`NOb<3qFm^8H0ZySpia;kGZ%KPQ{+KnW>l_{zz{fPDBZc1wDeOcET~Czp6|jpx9?dFN+TEM@XE@&ock|h0 zpDJpmxUt?gJ5yn>@xAC%mb(IhKyq~LKxtAp-uY}vscq9|bqL-rb@dy{U-|AtM(G5& zk|+dm!o8BNU-OF+OlP{w;0%$6{supG=pgmNBVGM%}zMptLX^0Y+X-v!oZMIq9{ zEz-|B(jV@7+n*(Xwx+hOnx?**7VNT?K3q!=uBCZaQxmSKDZuo>{yzW}>K7Og^S=Rf m-GngZ{{weC-|7{JQH-n{<27xq8#-IoUd literal 0 HcmV?d00001 diff --git a/data/icons/spot.png b/data/icons/spot.png new file mode 100644 index 0000000000000000000000000000000000000000..a209c38fa4c17f1780f7896822ca1f6635bf549f GIT binary patch literal 1475 zcmZ`(XHb&~5dAI(1}RDiHA*|_kU$W@L_v@sB?JgV3rGne2!T*E7C;o~k#=Z6N+6IJ zB2A@(C}b45Qvn4j2Jiqu^rQ&VZMk?qZsvYCv-{rL-FdV7Yw2z-_A-(%NdN$3933$3 zBDVgK5@I3*f;v1!s6ldY#{odR4ge&j0>EccE9pG|oHYS}4?zHcE&>3h80J0vQPBVt zjJ3xA!i>DWZczoMIpXZV@4--!^f64%0RSuSYkwD!!#@rF@9;28K_8aehm7%Erno$crOk zhOOrs440bMcKC;j3slguiABP#Pj5T7m}|m;2k$OF=VqHe)#GFfl`9=zIV0g8U!@XP zN!W^UDne0iZryzPVDy*Kp230P?#%Iuz?dT4>u{#H$yT<9p7 zFLtsm}cQ6guR1@BKvx7>gBFcRA?9zfjem zsct%1D>>Zp{L-)K(x{?Fvm-4GMXNWERr!o50%L!~YTcf|d(ILNUdN=us37Pt>T(u= z3-PHuKyAXc2igTMdT~Hk`a`P(OwK`+u(CN@8-kFx*by!q3iY}Dl5ydV^CI_Zwq?u2 z#0i_WtvqLS(}uq9b;%2D2xL5aY+W#WuMYQm4o?CZ*XmP$Sw@y~<}I{9>1G5fy~e0> zm+@|zkEic8C3;T2Olj|dr*0pSoD)YIEGU4YVBD*1S?TT6&%D zU9#qb@t-9@gUiofte)vW;X{j`kD(rGQ_^@}wM~LZnmg4-SNVM*k9j05+o@VJ^dkkt zQ04=*4Q3a|Mnip%@-EG_zOm4bCL@oWsOY#!rCzBHy_S8*oKNh)m zpBm01(#1Bv_$BV~WoZq=R|@WCB3a{SOS;5lG^jHRhS_ zK>~jw>LdF#m#a7nI~MXy*nT9daZzqt@1s6J%i!elgfysZ0RFIXbOB@=Wsn09-^F^FN97rbk2p8Xtjs%D5%K<@o|sl85tLx=@Ow)wXaC^(C$ol&%H3O{qOF0x0JM%SxC z3k-Bo)7D)H_y#s=X0N&+xches{*X&-KDMmZGskH*SRZo_-gasBhOS+Z-p~NJOv0%s)7}*5DfUH9Yxt2~oz^^e8!1Eyb+wue-_2gT3Hl zd1{aaQ-;RMwa&Aus-O%vZb0YT!iX^=-<2xMIi1o*A^B70-!F)@DzFwpNWNEpXmR<= zh(1I&`Lb0!Jj4N$)8X43HW-u(d)W`!#gW2rxAz2q6BG20urT~r zq{XGx{Les*4hav9`?+CV%TiHf(ED!#Eu2a|LnBgSe(vEQ_y4#GaI|y5+&&(Z{12gK Bniv28 literal 0 HcmV?d00001 diff --git a/data/icons/wels.png b/data/icons/wels.png new file mode 100644 index 0000000000000000000000000000000000000000..a63f9ec9cc837299ab56713a982bdfd4b535d57b GIT binary patch literal 1704 zcmZ`)X*ipS7XG9mVHhK5hqji~5?hf)Y@NmuBuK;ru}o{p!n8_5dvjZiHA1Kod(=|H zNUQop)iS6Uj0vtKv@>eGRceNsUZPd)9h3X#KF|D^ALo6~d(QJd=hrzWFM#B&p{B0} z0DuO;$1_mDxc>zdtUw^LCrE)tF+PF*0C2+$0MfGo;80OY-voebb^!2OBmg*90>FvH zn(ryDiUug!*V_{~$}O50P$)<;!5<#x9Rkg2L=u zW1{o5Qqfly#%YeF@YOA`rTbWTa7WqpHv;V#pSsO>Mo z<>##`BYyD;U*N(!N-wlDz4mh%hg2eyCYM>0RTkZE$G0&z>yFM}y3_wI?2;_%qP>7;9qTYEdT#Spkhc{#_?=h~mNN7vbG5M?E~|CrfP^hfJLuv{Uj!YM zNB-2c+?BM8Q{73>Y%waTEQS=pg=ZEYf!}rAJjF1eoPq2_>-WZWD(@uxYa5n3XRUR>P)PnnNtnZ0Bnd75( zB~RjFhDEK_9(qeR&NGSP#p3A~f^c>K^1&0{*)dvVN2kh)t=Fhg zt7J^0#aX__{qIpOvB*v4?T4oy8sDC99)e&b=G5G5NXtfyN+$a3v*PUn$=(Dic5<)K zhLf%xVHdlBT+qwFe+%C4FWn+j1j%3C!up`fb0(n^7{_|4ob-%c>y^ct739}5h-gUbVLMQjj>O#lF!if(Wm83Vw}JY zm7Ax3vLM>Zwz5OJDq$L}cir0;nyG%nZt>1iORxQqME ztKBD2hFYXtM}m%$)H*HzY~t%56~5Paq;DGj89fhfBoe5P}1e<&C-B!^cYsnz7@GUH)1vt`s&!tiN;p`Q~7Iz`W$d zJ@=+7g-nXOP@6^T3{DjV+a6sKABuDKoK8@B{;+;uT`=5Pz~B5KI)%QPMqpK}SqYc? zPD+Kth>fJVw@pvA+P!yWW489K-@;!$ULx%JiPoV+xUh#8qWXmoMhLQ!kcl!x;Dx1~ z6#bAc%@MrWhaQaj$`4A&+U50qkE;S-<$gKavSjPS5iq&&kLJ!yx{Kmen_($T_@~ literal 0 HcmV?d00001 diff --git a/data/mainnet/addresses.json b/data/mainnet/addresses.json index d7b0b5b7..a457ed23 100644 --- a/data/mainnet/addresses.json +++ b/data/mainnet/addresses.json @@ -1740,6 +1740,9 @@ "OVN": "0xA3d1a8DEB97B111454B294E2324EfAD13a9d8396", "STAR": "0xC19669A405067927865B40Ea045a2baabbbe57f5", "GENOME": "0x1db0c569ebb4a8b57AC01833B9792F526305e062", + "KLIMA": "0xDCEFd8C8fCc492630B943ABcaB3429F12Ea9Fea2", + "SPOT": "0x8f2E6758C4D6570344bd5007DEc6301cd57590A0", + "WELS": "0x7F62ac1e974D65Fab4A81821CA6AF659A5F46298", "V2": { "baseswap_BSWAP_ETH": { "Underlying": "0xE80B4F755417FB4baF4dbd23C029db3F62786523", @@ -1871,6 +1874,34 @@ "NewPool": "0x24Eff2133a9Ae99E591D4ecB4e7DF037E3d4f45F", "Gauge": "0xF64957C35409055776C7122AC655347ef88eaF9B" }, + "aerodrome_KLIMA_USDC": { + "Underlying": "0x958682eC6282BC7E939FA8Ba9397805C214c3A09", + "NewVault": "0x71EB5907333dD2a768d6D74cBD9054c0A0B16BE9", + "NewStrategy": "0xaBBAB688c39F1974CA68ECB95A6F495d5960501A", + "NewPool": "0xb049EB833A12d3BCa9bd3dd9535826e87e5beb0e", + "Gauge": "0x950aD950D6f07491ef2c150545A6A2AB7AdC03f4" + }, + "aerodrome_SPOT_USDC": { + "Underlying": "0xa43455d99Eb63473cFA186b388c1BC2EA1B63924", + "NewVault": "0x048B45e45Ba6153F6bADF05FCdC6154cF5e0E23a", + "NewStrategy": "0xF18954950A10F64FF25FBA9E0722D65a26F0dc17", + "NewPool": "0x17072dDA8dd62494fd3607F0eA775E5DBA823645", + "Gauge": "0xD90C0E9728fe44905384C89d867Ba095e2Dc3E2e" + }, + "aerodrome_KLIMA_ETH": { + "Underlying": "0xB37642E87613d8569Fd8Ec80888eA6c63684E79e", + "NewVault": "0x094185bc477FbeF37B076d1D1e987D3EB5BB1d69", + "NewStrategy": "0x0a6Cc3A3F8f0DA4de442DA5125bEb825348DD3ed", + "NewPool": "0x8d3ab153D3bfdCd9709e26354b2b4691917fdb00", + "Gauge": "0x44A927DD8f6def04f76B00cece9804BF441dc6b1" + }, + "aerodrome_WELS_ETH": { + "Underlying": "0xCaedc2561356B6a01a94E3C0438011459E91FBb9", + "NewVault": "0xE2820aeC35bB736c7920950BCA4eda9F671bA5B2", + "NewStrategy": "0xe3D23497fAACf79fa7784255133cD4de5beB4E22", + "NewPool": "0xe0A9076e571Bb1CBC084ebEf51B43CB420061460", + "Gauge": "0xdE41799DE5fB357f501dd9386ACee424E816f7a6" + }, "based_BASED_ETH": { "Underlying": "0x5F45e48F9C053286cE9Ca08Db897f8b7eb3f7992", "NewVault": "0xAe6F5f28463FB7A872f06aC8ABFAFFD56bb13F89", diff --git a/data/mainnet/pools.js b/data/mainnet/pools.js index 70494efe..ff63332f 100644 --- a/data/mainnet/pools.js +++ b/data/mainnet/pools.js @@ -4,6 +4,106 @@ const addresses = require('./addresses.json') const strat15PercentFactor = '0.85' module.exports = [ + { + chain: CHAIN_IDS.BASE, + id: 'aerodrome_KLIMA_USDC', + type: POOL_TYPES.INCENTIVE, + contractAddress: addresses.BASE.V2.aerodrome_KLIMA_USDC.NewPool, + collateralAddress: addresses.BASE.V2.aerodrome_KLIMA_USDC.NewVault, + rewardAPY: [], + rewardAPR: null, + rewardTokens: [addresses.BASE.iFARM], + rewardTokenSymbols: ['iFARM'], + stakeAndDepositHelpMessage: ` +
+

The vault supplies + Aerodrome LP tokens in a Aerodrome farm, earning + AERO. + At every harvest, the earned rewards are converted into more + Aerodrome LP tokens. +

+

Get the + Aerodrome LP tokens by supplying liquidity on + Aerodrome. +

+
+ `, + }, + { + chain: CHAIN_IDS.BASE, + id: 'aerodrome_SPOT_USDC', + type: POOL_TYPES.INCENTIVE, + contractAddress: addresses.BASE.V2.aerodrome_SPOT_USDC.NewPool, + collateralAddress: addresses.BASE.V2.aerodrome_SPOT_USDC.NewVault, + rewardAPY: [], + rewardAPR: null, + rewardTokens: [addresses.BASE.iFARM], + rewardTokenSymbols: ['iFARM'], + stakeAndDepositHelpMessage: ` +
+

The vault supplies + Aerodrome LP tokens in a Aerodrome farm, earning + AERO. + At every harvest, the earned rewards are converted into more + Aerodrome LP tokens. +

+

Get the + Aerodrome LP tokens by supplying liquidity on + Aerodrome. +

+
+ `, + }, + { + chain: CHAIN_IDS.BASE, + id: 'aerodrome_KLIMA_ETH', + type: POOL_TYPES.INCENTIVE, + contractAddress: addresses.BASE.V2.aerodrome_KLIMA_ETH.NewPool, + collateralAddress: addresses.BASE.V2.aerodrome_KLIMA_ETH.NewVault, + rewardAPY: [], + rewardAPR: null, + rewardTokens: [addresses.BASE.iFARM], + rewardTokenSymbols: ['iFARM'], + stakeAndDepositHelpMessage: ` +
+

The vault supplies + Aerodrome LP tokens in a Aerodrome farm, earning + AERO. + At every harvest, the earned rewards are converted into more + Aerodrome LP tokens. +

+

Get the + Aerodrome LP tokens by supplying liquidity on + Aerodrome. +

+
+ `, + }, + { + chain: CHAIN_IDS.BASE, + id: 'aerodrome_WELS_ETH', + type: POOL_TYPES.INCENTIVE, + contractAddress: addresses.BASE.V2.aerodrome_WELS_ETH.NewPool, + collateralAddress: addresses.BASE.V2.aerodrome_WELS_ETH.NewVault, + rewardAPY: [], + rewardAPR: null, + rewardTokens: [addresses.BASE.iFARM], + rewardTokenSymbols: ['iFARM'], + stakeAndDepositHelpMessage: ` +
+

The vault supplies + Aerodrome LP tokens in a Aerodrome farm, earning + AERO. + At every harvest, the earned rewards are converted into more + Aerodrome LP tokens. +

+

Get the + Aerodrome LP tokens by supplying liquidity on + Aerodrome. +

+
+ `, + }, { chain: CHAIN_IDS.ARBITRUM_ONE, id: 'balancer_cbETH_rETH_wstETH', diff --git a/data/mainnet/tokens.js b/data/mainnet/tokens.js index e8da2b79..77d1d4dc 100644 --- a/data/mainnet/tokens.js +++ b/data/mainnet/tokens.js @@ -46,6 +46,147 @@ module.exports = { ], cmcRewardTokenSymbols: ['FARM', 'WETH'], }, + KLIMA_base: { + chain: CHAIN_IDS.BASE, + logoUrl: [''], + tokenAddress: addresses.BASE.KLIMA, + decimals: '18', + vaultAddress: null, + priceFunction: { + type: GET_PRICE_TYPES.COINGECKO_ID, + params: ['klima-dao'], + }, + }, + SPOT_base: { + chain: CHAIN_IDS.BASE, + logoUrl: [''], + tokenAddress: addresses.BASE.SPOT, + decimals: '18', + vaultAddress: null, + priceFunction: { + type: GET_PRICE_TYPES.COINGECKO_ID, + params: ['spot'], + }, + }, + WELS_base: { + chain: CHAIN_IDS.BASE, + logoUrl: [''], + tokenAddress: addresses.BASE.WELS, + decimals: '18', + vaultAddress: null, + priceFunction: { + type: GET_PRICE_TYPES.COINGECKO_ID, + params: ['ethlas'], + }, + }, + aerodrome_KLIMA_USDC: { + chain: CHAIN_IDS.BASE, + apyIconUrls: ['./icons/aero.svg'], + apyTokenSymbols: ['AERO'], + logoUrl: ['./icons/klima.png', './icons/usdc.svg'], + tokenNames: ['KLIMA', 'USDC'], + platform: ['Aerodrome'], + tags: ['Advanced'], + tokenAddress: addresses.BASE.V2.aerodrome_KLIMA_USDC.Underlying, + decimals: '18', + vaultAddress: addresses.BASE.V2.aerodrome_KLIMA_USDC.NewVault, + priceFunction: { + type: GET_PRICE_TYPES.LP_TOKEN, + params: [addresses.BASE.V2.aerodrome_KLIMA_USDC.Underlying, 'KLIMA_base', 'USDC_base'], + }, + estimateApyFunctions: [ + { + type: ESTIMATED_APY_TYPES.AERODROME, + params: [ + addresses.BASE.V2.aerodrome_KLIMA_USDC.Underlying, + addresses.BASE.V2.aerodrome_KLIMA_USDC.Gauge, + profitSharingCut10Percent, + ], + }, + ], + cmcRewardTokenSymbols: ['iFARM', 'AERO'], + }, + aerodrome_SPOT_USDC: { + chain: CHAIN_IDS.BASE, + apyIconUrls: ['./icons/aero.svg'], + apyTokenSymbols: ['AERO'], + logoUrl: ['./icons/spot.png', './icons/usdc.svg'], + tokenNames: ['SPOT', 'USDC'], + platform: ['Aerodrome'], + tags: ['Advanced'], + tokenAddress: addresses.BASE.V2.aerodrome_SPOT_USDC.Underlying, + decimals: '18', + vaultAddress: addresses.BASE.V2.aerodrome_SPOT_USDC.NewVault, + priceFunction: { + type: GET_PRICE_TYPES.LP_TOKEN, + params: [addresses.BASE.V2.aerodrome_SPOT_USDC.Underlying, 'SPOT_base', 'USDC_base'], + }, + estimateApyFunctions: [ + { + type: ESTIMATED_APY_TYPES.AERODROME, + params: [ + addresses.BASE.V2.aerodrome_SPOT_USDC.Underlying, + addresses.BASE.V2.aerodrome_SPOT_USDC.Gauge, + profitSharingCut10Percent, + ], + }, + ], + cmcRewardTokenSymbols: ['iFARM', 'AERO'], + }, + aerodrome_KLIMA_ETH: { + chain: CHAIN_IDS.BASE, + apyIconUrls: ['./icons/aero.svg'], + apyTokenSymbols: ['AERO'], + logoUrl: ['./icons/klima.png', './icons/eth.svg'], + tokenNames: ['KLIMA', 'ETH'], + platform: ['Aerodrome'], + tags: ['Advanced'], + tokenAddress: addresses.BASE.V2.aerodrome_KLIMA_ETH.Underlying, + decimals: '18', + vaultAddress: addresses.BASE.V2.aerodrome_KLIMA_ETH.NewVault, + priceFunction: { + type: GET_PRICE_TYPES.LP_TOKEN, + params: [addresses.BASE.V2.aerodrome_KLIMA_ETH.Underlying, 'KLIMA_base', 'WETH_base'], + }, + estimateApyFunctions: [ + { + type: ESTIMATED_APY_TYPES.AERODROME, + params: [ + addresses.BASE.V2.aerodrome_KLIMA_ETH.Underlying, + addresses.BASE.V2.aerodrome_KLIMA_ETH.Gauge, + profitSharingCut10Percent, + ], + }, + ], + cmcRewardTokenSymbols: ['iFARM', 'AERO'], + }, + aerodrome_WELS_ETH: { + chain: CHAIN_IDS.BASE, + apyIconUrls: ['./icons/aero.svg'], + apyTokenSymbols: ['AERO'], + logoUrl: ['./icons/wels.png', './icons/eth.svg'], + tokenNames: ['WELS', 'ETH'], + platform: ['Aerodrome'], + tags: ['Advanced'], + tokenAddress: addresses.BASE.V2.aerodrome_WELS_ETH.Underlying, + decimals: '18', + vaultAddress: addresses.BASE.V2.aerodrome_WELS_ETH.NewVault, + priceFunction: { + type: GET_PRICE_TYPES.LP_TOKEN, + params: [addresses.BASE.V2.aerodrome_WELS_ETH.Underlying, 'WELS_base', 'WETH_base'], + }, + estimateApyFunctions: [ + { + type: ESTIMATED_APY_TYPES.AERODROME, + params: [ + addresses.BASE.V2.aerodrome_WELS_ETH.Underlying, + addresses.BASE.V2.aerodrome_WELS_ETH.Gauge, + profitSharingCut10Percent, + ], + }, + ], + cmcRewardTokenSymbols: ['iFARM', 'AERO'], + }, CBETH_arbitrum: { chain: CHAIN_IDS.ARBITRUM_ONE, logoUrl: ['./icons/cbeth.svg'], diff --git a/src/lib/third-party/lido.js b/src/lib/third-party/lido.js index 19048aa7..7444d735 100644 --- a/src/lib/third-party/lido.js +++ b/src/lib/third-party/lido.js @@ -8,21 +8,23 @@ const get7MAAPRs = networkId => { apiURL = LIDO_API_URLS.ETH } - return cachedAxios - .get(apiURL) - .then(response => { - const data = get(response, `data.data.smaApr`) - if (data) { - return data - } else { - console.error(get(response, 'data.errors', response)) - return null - } - }) - .catch(error => { - console.error(`Lido APRs api failed:`, error) - return null - }) + return 6.12 + + // return cachedAxios + // .get(apiURL) + // .then(response => { + // const data = get(response, `data.data.smaApr`) + // if (data) { + // return data + // } else { + // console.error(get(response, 'data.errors', response)) + // return null + // } + // }) + // .catch(error => { + // console.error(`Lido APRs api failed:`, error) + // return null + // }) } module.exports = { get7MAAPRs } From fe587448f710b28b95ca35f1ce4f33753948eda7 Mon Sep 17 00:00:00 2001 From: William Liu Date: Fri, 19 Jul 2024 01:07:10 +0000 Subject: [PATCH 2/3] fix: lido apr --- src/lib/third-party/lido.js | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/src/lib/third-party/lido.js b/src/lib/third-party/lido.js index 7444d735..6b2db056 100644 --- a/src/lib/third-party/lido.js +++ b/src/lib/third-party/lido.js @@ -8,23 +8,21 @@ const get7MAAPRs = networkId => { apiURL = LIDO_API_URLS.ETH } - return 6.12 - - // return cachedAxios - // .get(apiURL) - // .then(response => { - // const data = get(response, `data.data.smaApr`) - // if (data) { - // return data - // } else { - // console.error(get(response, 'data.errors', response)) - // return null - // } - // }) - // .catch(error => { - // console.error(`Lido APRs api failed:`, error) - // return null - // }) + return cachedAxios + .get(apiURL) + .then(response => { + const data = get(response, `data.data.smaApr`) + if (data) { + return data + } else { + console.error(get(response, 'data.errors', response)) + return null + } + }) + .catch(error => { + console.error(`Lido APRs api failed:`, error) + return null + }) } module.exports = { get7MAAPRs } From 583acf5bf843b487e999ec18f16d33c957955d54 Mon Sep 17 00:00:00 2001 From: William Liu Date: Fri, 19 Jul 2024 01:09:05 +0000 Subject: [PATCH 3/3] fix: lint issue --- src/lib/third-party/lido.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/lib/third-party/lido.js b/src/lib/third-party/lido.js index 6b2db056..19048aa7 100644 --- a/src/lib/third-party/lido.js +++ b/src/lib/third-party/lido.js @@ -9,20 +9,20 @@ const get7MAAPRs = networkId => { } return cachedAxios - .get(apiURL) - .then(response => { - const data = get(response, `data.data.smaApr`) - if (data) { - return data - } else { - console.error(get(response, 'data.errors', response)) + .get(apiURL) + .then(response => { + const data = get(response, `data.data.smaApr`) + if (data) { + return data + } else { + console.error(get(response, 'data.errors', response)) + return null + } + }) + .catch(error => { + console.error(`Lido APRs api failed:`, error) return null - } - }) - .catch(error => { - console.error(`Lido APRs api failed:`, error) - return null - }) + }) } module.exports = { get7MAAPRs }