Skip to content

Commit

Permalink
Refactor skyPositionsHandler and skyProducts to update description fr…
Browse files Browse the repository at this point in the history
…om 'Sky Savings Rate' to 'Sky Rewards Rate'
  • Loading branch information
marcinciarka committed Sep 20, 2024
1 parent 7958fef commit 73ef2a6
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion features/productHub/helpers/getGenericPositionUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export function getGenericPositionUrl({
aaveLikeProduct: 'aave',
})
case LendingProtocol.Sky:
if (label === 'SSR') return '/earn/ssr/'
if (label === 'SRR') return '/earn/srr/'
return '/'
case LendingProtocol.Maker:
if (label === 'DSR') return '/earn/dsr/'
Expand Down
2 changes: 1 addition & 1 deletion handlers/portfolio/positions/handlers/sky/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const skyPositionsHandler: PortfolioPositionsHandler = async ({ address }
protocol: LendingProtocol.Sky,
secondaryToken: 'USDS',
type: OmniProductType.Earn,
url: `/earn/ssr/${address}`,
url: `/earn/srr/${address}`,
},
]
: [],
Expand Down
8 changes: 4 additions & 4 deletions handlers/product-hub/update-handlers/sky/skyHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
import { skyProductHubProducts } from 'handlers/product-hub/update-handlers/sky/skyProducts'

async function getSkyData(networkId: NetworkIds.MAINNET): ProductHubHandlerResponse {
return Promise.all([skyUsdsStakeDetails()]).then(([ssrData]) => {
return Promise.all([skyUsdsStakeDetails()]).then(([srrData]) => {
return {
table: skyProductHubProducts
.map((product) => {
Expand All @@ -18,15 +18,15 @@ async function getSkyData(networkId: NetworkIds.MAINNET): ProductHubHandlerRespo
const primaryTokenAddress = tokensAddresses[primaryToken].address
const secondaryTokenAddress = tokensAddresses[secondaryToken].address

if (label === 'SSR') {
if (label === 'SRR') {
return {
...product,
primaryTokenAddress,
secondaryTokenAddress,
network: networksById[networkId].name as ProductHubSupportedNetworks,
hasRewards: true,
fee: ssrData.rewardRate.toString(),
liquidity: ssrData.totalUSDSLocked.toString(),
fee: srrData.rewardRate.toString(),
liquidity: srrData.totalUSDSLocked.toString(),
}
}
return {}
Expand Down
2 changes: 1 addition & 1 deletion handlers/product-hub/update-handlers/sky/skyProducts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const skyProductHubProducts: Omit<ProductHubItemWithoutAddress, 'network'
secondaryToken: 'USDS',
depositToken: 'USDS',
protocol: LendingProtocol.Sky,
label: 'SSR',
label: 'SRR',
managementType: 'passive',
earnStrategy: EarnStrategies.other,
earnStrategyDescription: 'Sky Rewards Rate',
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 73ef2a6

Please sign in to comment.