Skip to content

Commit

Permalink
Add native route supported tokens to chain config
Browse files Browse the repository at this point in the history
  • Loading branch information
Oskar committed Jun 18, 2024
1 parent 72cc388 commit 5d73726
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/app/src/config/chain/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ const chainConfig: ChainConfig = {
[TokenSymbol('DAI'), TokenSymbol('sDAI')],
[TokenSymbol('USDC'), TokenSymbol('sDAI')],
],
savingsNativeRouteTokens: [
import.meta.env.VITE_DEV_DAI_NATIVE_ROUTES && TokenSymbol('DAI'),
import.meta.env.VITE_DEV_USDC_NATIVE_ROUTES && TokenSymbol('USDC'),
].filter(Boolean),
},
[gnosis.id]: {
id: gnosis.id,
Expand Down Expand Up @@ -111,6 +115,7 @@ const chainConfig: ChainConfig = {
// without PSMs only DAI to sDAI route has waived fees
[TokenSymbol('XDAI'), TokenSymbol('sDAI')],
],
savingsNativeRouteTokens: [import.meta.env.VITE_DEV_XDAI_NATIVE_ROUTES && TokenSymbol('XDAI')].filter(Boolean),
},
}

Expand Down
3 changes: 3 additions & 0 deletions packages/app/src/config/chain/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export type Airdrop = Record<TokenSymbol, AirdropsPerAction>
// routes are always bidirectional
export type LifiWaivedRoutes = [TokenSymbol, TokenSymbol][]

export type SavingsNativeRouteTokens = TokenSymbol[]

export interface ChainConfigEntry {
id: SupportedChainId
meta: ChainMeta
Expand All @@ -54,6 +56,7 @@ export interface ChainConfigEntry {
lifiRoutesWithWaivedFees: LifiWaivedRoutes
daiSymbol: TokenSymbol
sDaiSymbol: TokenSymbol
savingsNativeRouteTokens: SavingsNativeRouteTokens
}

export type ChainConfig = Record<SupportedChainId, ChainConfigEntry>

0 comments on commit 5d73726

Please sign in to comment.