Skip to content

Commit

Permalink
Merge pull request #333 from alchemix-finance/staging
Browse files Browse the repository at this point in the history
CHORE: Staging
  • Loading branch information
t0rbik authored Dec 20, 2024
2 parents 6355fa3 + d8ab631 commit 37d1c40
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 11 deletions.
9 changes: 4 additions & 5 deletions src/components/vaults/row/Info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ export const Info = ({ vault }: { vault: Vault }) => {
},
gateway: {
label: "Gateway",
address: vault.metadata.gateway ?? vault.metadata.wethGateway,
address: vault.metadata.gateway,
},
strategy: {
label: "Strategy",
address: vault.metadata.strategy,
vanity: vault.metadata.label,
wethGateway: {
label: "WETH Gateway",
address: vault.metadata.wethGateway,
},
} as const;

Expand Down
27 changes: 22 additions & 5 deletions src/lib/config/metadataTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type ApiProvider =
| "jones"
| "dinero";

export interface VaultMetadata {
interface VaultMetadataBase {
label: string;
image: string;
synthAssetType: SynthAsset;
Expand All @@ -75,18 +75,35 @@ export interface VaultMetadata {
disabledDepositTokens: Address[];
disabledWithdrawTokens: Address[];
wethGateway?: Address;
gateway?: Address;
beta?: boolean;
}

interface VaultMetadataWithYieldTokenOverride extends VaultMetadataBase {
gateway: Address;
/**
* This is the address of the actual yield (bearing for aave) token,
* the regular yield token address in this case becomes a (static token adapter for aave or staking token for yearn),
* that we use for the vaults.
* If it exists, means the vault is using (static token adapter for aave or staking token for yearn).
*/
yieldTokenOverride?: Address;
strategy?: string;
beta?: boolean;
yieldTokenOverride: Address;
}

interface VaultMetadataWithoutYieldTokenOverride extends VaultMetadataBase {
gateway?: never;
/**
* This is the address of the actual yield (bearing for aave) token,
* the regular yield token address in this case becomes a (static token adapter for aave or staking token for yearn),
* that we use for the vaults.
* If it exists, means the vault is using (static token adapter for aave or staking token for yearn).
*/
yieldTokenOverride?: never;
}

export type VaultMetadata =
| VaultMetadataWithYieldTokenOverride
| VaultMetadataWithoutYieldTokenOverride;

/**
* Handle fetching APR data
*/
Expand Down
6 changes: 5 additions & 1 deletion src/lib/config/vaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export const VAULTS: VaultsConfig = {
image: "aDAI.svg",
messages: [],
yieldTokenOverride: "0x028171bCA77440897B824Ca71D1c56caC55b68A3",
gateway: "0x67EC822A2F981Ef2db6Afce4E8dF57ff1439f4d3",
api: {
apr: getAaveApr,
yieldType: "APR",
Expand All @@ -114,6 +115,7 @@ export const VAULTS: VaultsConfig = {
image: "aUSDC.svg",
messages: [],
yieldTokenOverride: "0xBcca60bB61934080951369a648Fb03DF4F96263C",
gateway: "0x67EC822A2F981Ef2db6Afce4E8dF57ff1439f4d3",
api: {
apr: getAaveApr,
yieldType: "APR",
Expand All @@ -131,6 +133,7 @@ export const VAULTS: VaultsConfig = {
image: "aUSDT.svg",
messages: [],
yieldTokenOverride: "0x3Ed3B47Dd13EC9a98b44e6204A523E766B225811",
gateway: "0x67EC822A2F981Ef2db6Afce4E8dF57ff1439f4d3",
api: {
apr: getAaveApr,
yieldType: "APR",
Expand Down Expand Up @@ -212,6 +215,7 @@ export const VAULTS: VaultsConfig = {
image: "aFRAX.svg",
messages: [],
yieldTokenOverride: "0xd4937682df3C8aEF4FE912A96A74121C0829E664",
gateway: "0x67EC822A2F981Ef2db6Afce4E8dF57ff1439f4d3",
api: {
apr: getAaveApr,
yieldType: "APR",
Expand Down Expand Up @@ -247,7 +251,6 @@ export const VAULTS: VaultsConfig = {
image: "wstETH.svg",
messages: [],
wethGateway: "0xA22a7ec2d82A471B1DAcC4B37345Cf428E76D67A",
gateway: "0xA22a7ec2d82A471B1DAcC4B37345Cf428E76D67A",
api: {
apr: getLidoApy,
yieldType: "APR",
Expand Down Expand Up @@ -283,6 +286,7 @@ export const VAULTS: VaultsConfig = {
messages: [],
wethGateway: "0xA22a7ec2d82A471B1DAcC4B37345Cf428E76D67A",
yieldTokenOverride: "0x030bA81f1c18d280636F32af80b9AAd02Cf0854e",
gateway: "0xA067C885d958aec176eC3D8dAdc847e0c9384809",
api: {
apr: getAaveApr,
yieldType: "APR",
Expand Down

0 comments on commit 37d1c40

Please sign in to comment.