Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
fix(metavault-trade): Re-branded assets added for MVLP and esMVX toke…
Browse files Browse the repository at this point in the history
…ns (#1202)
  • Loading branch information
0xrmvdao authored Aug 19, 2022
1 parent ae331e3 commit e440fd6
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/apps/metavault-trade/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@ import { Inject, Injectable } from '@nestjs/common';

import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface';
import { buildDollarDisplayItem } from '~app-toolkit/helpers/presentation/display-item.present';
import { getTokenImg } from '~app-toolkit/helpers/presentation/image.present';
import { getAppAssetImage } from '~app-toolkit/helpers/presentation/image.present';
import { ContractType } from '~position/contract.interface';
import { AppTokenPosition } from '~position/position.interface';
import { Network } from '~types/network.interface';

import { MetavaultTradeContractFactory } from '../contracts';
import { METAVAULT_TRADE_DEFINITION } from '../metavault-trade.definition';

import { METAVAULT_TOKENS } from './../metavault-trade.definition';

type GetMetavaultTradeEsMvxTokenParams = {
network: Network;
esMvxTokenAddress: string;
};

const appId = METAVAULT_TRADE_DEFINITION.id;

@Injectable()
export class MetavaultTradeEsMvxTokenHelper {
constructor(
Expand Down Expand Up @@ -44,7 +48,7 @@ export class MetavaultTradeEsMvxTokenHelper {
// Display Props
const label = symbol;
const secondaryLabel = buildDollarDisplayItem(price);
const images = [getTokenImg(underlyingToken.address, network)];
const images = [getAppAssetImage(appId, METAVAULT_TOKENS.esMvx)];

const vaultToken: AppTokenPosition = {
type: ContractType.APP_TOKEN,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ import { range } from 'lodash';

import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface';
import { buildDollarDisplayItem } from '~app-toolkit/helpers/presentation/display-item.present';
import { getTokenImg } from '~app-toolkit/helpers/presentation/image.present';
import { getAppAssetImage } from '~app-toolkit/helpers/presentation/image.present';
import { ContractType } from '~position/contract.interface';
import { AppTokenPosition } from '~position/position.interface';
import { Network } from '~types/network.interface';

import { MetavaultTradeContractFactory } from '../contracts';
import { METAVAULT_TRADE_DEFINITION } from '../metavault-trade.definition';

const appId = METAVAULT_TRADE_DEFINITION.id;

type GetMetavaultTradeMvlpTokenParams = {
network: Network;
mvlpManagerAddress: string;
Expand Down Expand Up @@ -72,7 +74,8 @@ export class MetavaultTradeMvlpTokenHelper {
// Display Props
const label = symbol;
const secondaryLabel = buildDollarDisplayItem(price);
const images = [getTokenImg(mvlpTokenAddress, network)];
const images = [getAppAssetImage(appId, mvlpTokenAddress)];

const statsItems = [{ label: 'Liquidity', value: buildDollarDisplayItem(liquidity) }];

const mvlpToken: AppTokenPosition = {
Expand Down
6 changes: 6 additions & 0 deletions src/apps/metavault-trade/metavault-trade.definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ import { appDefinition, AppDefinition } from '~app/app.definition';
import { AppAction, AppTag, GroupType } from '~app/app.interface';
import { Network } from '~types/network.interface';

export const METAVAULT_TOKENS = {
mvx: '0x2760e46d9bb43dafcbecaad1f64b93207f9f0ed7',
mvlp: '0x9f4f8bc00f48663b7c204c96b932c29ccc43a2e8',
esMvx: '0xd1b2f8dff8437be57430ee98767d512f252ead61',
};

export const METAVAULT_TRADE_DEFINITION = appDefinition({
id: 'metavault-trade',
name: 'Metavault.Trade',
Expand Down

0 comments on commit e440fd6

Please sign in to comment.