-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend config with navigation specific data (#38)
* Extend config with navigation specific data * split config into smaller pieces * convert getNavigation to function * undo changes in gitignore * undo changes in gitignore
- Loading branch information
Showing
4 changed files
with
181 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { ConfigHelperType } from "⌨️"; | ||
|
||
export const getFeatures = ({ isStaging }: Pick<ConfigHelperType, 'isStaging'>) => ({ | ||
AaveV3ArbitrumBorrow: true, | ||
AaveV3ArbitrumEarn: false, | ||
AaveV3EarncbETHeth: false, | ||
AaveV3EarnrETHeth: false, | ||
AaveV3History: false, | ||
AaveV3OptimismBorrow: true, | ||
AaveV3OptimismEarn: false, | ||
AaveV3Protection: true, | ||
AaveV3ProtectionWrite: true, | ||
AjnaPoolFinder: true, | ||
AjnaReusableDPM: false, | ||
AjnaSafetySwitch: true, | ||
AjnaSuppressValidation: false, | ||
AnotherTestFeature: true, // used in unit tests | ||
ConstantMultipleReadOnly: false, | ||
DaiSavingsRate: true, | ||
DisableSidebarScroll: false, | ||
FollowAAVEVaults: false, | ||
NewNavigation: false, | ||
ProxyCreationDisabled: false, | ||
ProxyReveal: false, | ||
ReadOnlyAutoTakeProfit: false, | ||
ReadOnlyBasicBS: false, | ||
Referrals: true, | ||
Sillyness: false, | ||
StopLossOpenFlow: false, | ||
StopLossRead: true, | ||
StopLossWrite: true, | ||
TestFeature: false, // used in unit tests | ||
UseNetworkSwitcherForks: false, | ||
UseNetworkSwitcherTestnets: false, | ||
SparkProtocolStopLoss: isStaging, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
export const getNavigation= () => ({ | ||
protocols: { | ||
ajna: { | ||
borrow: { | ||
tokens: ['ETH', 'WBTC', 'DAI'], | ||
extra: { | ||
title: 'Amplify sDAI up to 35x.', | ||
description: | ||
'Use Summer.fi multiply to increase your exposure to sDAI yield seamlessly.', | ||
url: '/', | ||
}, | ||
}, | ||
multiply: { | ||
tokens: ['ETH', 'WBTC', 'DAI'], | ||
extra: { | ||
title: 'Amplify sDAI up to 35x.', | ||
description: | ||
'Use Summer.fi multiply to increase your exposure to sDAI yield seamlessly.', | ||
url: '/', | ||
}, | ||
}, | ||
earn: { | ||
tokens: ['ETH', 'WBTC', 'DAI'], | ||
extra: { | ||
title: 'Amplify sDAI up to 35x.', | ||
description: | ||
'Use Summer.fi multiply to increase your exposure to sDAI yield seamlessly.', | ||
url: '/', | ||
}, | ||
}, | ||
}, | ||
aave: { | ||
borrow: { | ||
tokens: ['ETH', 'WBTC', 'DAI'], | ||
extra: { | ||
title: 'Amplify sDAI up to 35x.', | ||
description: | ||
'Use Summer.fi multiply to increase your exposure to sDAI yield seamlessly.', | ||
url: '/', | ||
}, | ||
}, | ||
multiply: { | ||
tokens: ['ETH', 'WBTC', 'DAI'], | ||
extra: { | ||
title: 'Amplify sDAI up to 35x.', | ||
description: | ||
'Use Summer.fi multiply to increase your exposure to sDAI yield seamlessly.', | ||
url: '', | ||
}, | ||
}, | ||
earn: { | ||
tokens: ['ETH', 'WBTC', 'DAI'], | ||
extra: { | ||
title: 'Amplify sDAI up to 35x.', | ||
description: | ||
'Use Summer.fi multiply to increase your exposure to sDAI yield seamlessly.', | ||
url: '/', | ||
}, | ||
}, | ||
}, | ||
maker: { | ||
borrow: { | ||
tokens: ['ETH', 'WBTC', 'DAI'], | ||
extra: { | ||
title: 'Amplify sDAI up to 35x.', | ||
description: | ||
'Use Summer.fi multiply to increase your exposure to sDAI yield seamlessly.', | ||
url: '', | ||
}, | ||
}, | ||
multiply: { | ||
tokens: ['ETH', 'WBTC', 'DAI'], | ||
extra: { | ||
title: 'Amplify sDAI up to 35x.', | ||
description: | ||
'Use Summer.fi multiply to increase your exposure to sDAI yield seamlessly.', | ||
url: '', | ||
}, | ||
}, | ||
earn: { | ||
tokens: ['ETH', 'WBTC', 'DAI'], | ||
extra: { | ||
title: 'Amplify sDAI up to 35x.', | ||
description: | ||
'Use Summer.fi multiply to increase your exposure to sDAI yield seamlessly.', | ||
url: '', | ||
}, | ||
}, | ||
}, | ||
spark: { | ||
borrow: { | ||
tokens: ['ETH', 'WBTC', 'DAI'], | ||
extra: { | ||
title: 'Amplify sDAI up to 35x.', | ||
description: | ||
'Use Summer.fi multiply to increase your exposure to sDAI yield seamlessly.', | ||
url: '', | ||
}, | ||
}, | ||
multiply: { | ||
tokens: ['ETH', 'WBTC', 'DAI'], | ||
extra: { | ||
title: 'Amplify sDAI up to 35x.', | ||
description: | ||
'Use Summer.fi multiply to increase your exposure to sDAI yield seamlessly.', | ||
url: '', | ||
}, | ||
}, | ||
earn: { | ||
tokens: ['ETH', 'WBTC', 'DAI'], | ||
extra: { | ||
title: 'Amplify sDAI up to 35x.', | ||
description: | ||
'Use Summer.fi multiply to increase your exposure to sDAI yield seamlessly.', | ||
url: '', | ||
}, | ||
}, | ||
}, | ||
}, | ||
tokens: { | ||
popular: ['ETH, STETH', 'RETH', 'CBETH', 'DAI'], | ||
new: ['SDAI', 'GHO', 'TBTC'], | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {ConfigHelperType} from "⌨️"; | ||
|
||
export const getParameters = ({notProduction}: Pick<ConfigHelperType, 'notProduction'>) => ({ | ||
topBanner: { | ||
name: 'rebranding', | ||
url: 'https://blog.summer.fi/oasis-app-rebrands-to-summer-fi/', | ||
message: 'Oasis.app is now Summer.fi! Read the announcement', | ||
}, | ||
aaveLike: { | ||
orderInformation: { | ||
showFlashloanInformation: notProduction, | ||
}, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,16 @@ | ||
import { ConfigHelperType } from "⌨️"; | ||
import { getFeatures } from "./getFeatures"; | ||
import { getNavigation } from "./getNavigation"; | ||
import { getParameters } from "./getParameters"; | ||
|
||
export default function ({ | ||
isDevelopment: _isDevelopment, | ||
notProduction, | ||
isStaging, | ||
}: ConfigHelperType) { | ||
return { | ||
features: { | ||
AaveV3ArbitrumBorrow: true, | ||
AaveV3ArbitrumEarn: false, | ||
AaveV3EarncbETHeth: false, | ||
AaveV3EarnrETHeth: false, | ||
AaveV3History: false, | ||
AaveV3OptimismBorrow: true, | ||
AaveV3OptimismEarn: false, | ||
AaveV3Protection: true, | ||
AaveV3ProtectionWrite: true, | ||
AjnaPoolFinder: true, | ||
AjnaReusableDPM: false, | ||
AjnaSafetySwitch: true, | ||
AjnaSuppressValidation: false, | ||
AnotherTestFeature: true, // used in unit tests | ||
ConstantMultipleReadOnly: false, | ||
DaiSavingsRate: true, | ||
DisableSidebarScroll: false, | ||
FollowAAVEVaults: false, | ||
NewNavigation: false, | ||
ProxyCreationDisabled: false, | ||
ProxyReveal: false, | ||
ReadOnlyAutoTakeProfit: false, | ||
ReadOnlyBasicBS: false, | ||
Referrals: true, | ||
Sillyness: false, | ||
StopLossOpenFlow: false, | ||
StopLossRead: true, | ||
StopLossWrite: true, | ||
TestFeature: false, // used in unit tests | ||
UseNetworkSwitcherForks: false, | ||
UseNetworkSwitcherTestnets: false, | ||
SparkProtocolStopLoss: isStaging, | ||
}, | ||
parameters: { | ||
topBanner: { | ||
name: "rebranding", | ||
url: "https://blog.summer.fi/oasis-app-rebrands-to-summer-fi/", | ||
message: "Oasis.app is now Summer.fi! Read the announcement", | ||
}, | ||
aaveLike: { | ||
orderInformation: { | ||
showFlashloanInformation: notProduction, | ||
}, | ||
}, | ||
}, | ||
}; | ||
features: getFeatures({ isStaging }), | ||
parameters: getParameters({ notProduction }), | ||
navigation: getNavigation(), | ||
} | ||
} |