Skip to content

Commit

Permalink
Merge pull request #631 from hats-finance/fix/morpho-edition
Browse files Browse the repository at this point in the history
Changes to morpho vault
  • Loading branch information
shayzluf authored Jan 6, 2024
2 parents 792bb7f + 32777f8 commit 433c290
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/web/src/hooks/subgraph/vaults/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ export const overrideDescription = (vaultAddress: string, description?: IVaultDe
description["project-metadata"].name = "Convergence Finance";
}

// Change Morpho token icon to USDC
const morphoId = "0x24a8c183cf365cbc7b7f1d597e51246713fde4f9";
if (morphoId === vaultAddress.toLowerCase()) {
description["project-metadata"].tokenIcon = "ipfs://QmTBHBZchoxncW1LXCvptTbvRzuZDN8yzze3xXrRsh2WZz";
}

return description;
};

Expand Down Expand Up @@ -71,6 +77,12 @@ const fixVaultsData = (vaults: IVault[]) => {
const possumVault = newVaults.find((vault) => vault.id.toLowerCase() === "0xed8965d49b8aeca763447d56e6da7f4e0506b2d3");
if (possumVault) possumVault.governanceHatRewardSplit = "2000";

// Override information for Morpho vault
const morphoVault = newVaults.find((vault) => vault.id.toLowerCase() === "0x24a8c183cf365cbc7b7f1d597e51246713fde4f9");
if (morphoVault) morphoVault.registered = true;
if (morphoVault && morphoVault.descriptionHash === "QmeLFD6czyZq7GBsqy6Ukdep5oGzr2RfxDvDhdwJ8TyCHU")
morphoVault.descriptionHash = "QmTMTK6NpVgqjr664VTS44opgU1FpvkL2gcvyVYvGu85Fk";

return newVaults;
};

Expand Down

0 comments on commit 433c290

Please sign in to comment.