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

Commit

Permalink
feat(qi-dao): Add assetStandard to vault dataProps (#506)
Browse files Browse the repository at this point in the history
Co-authored-by: immasandwich <karan.shahani91@gmail.com>
  • Loading branch information
pwele and immasandwich committed May 25, 2022
1 parent ce08a3b commit 5a8141e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/apps/qi-dao/helpers/qi-dao.vault.position-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ZERO_ADDRESS } from '~app-toolkit/constants/address';
import { buildDollarDisplayItem } from '~app-toolkit/helpers/presentation/display-item.present';
import { getImagesFromToken, getTokenImg } from '~app-toolkit/helpers/presentation/image.present';
import { ContractType } from '~position/contract.interface';
import { ContractPosition } from '~position/position.interface';
import { ContractPosition, Standard } from '~position/position.interface';
import { AppGroupsDefinition } from '~position/position.service';
import { borrowed, supplied } from '~position/position.utils';
import { Network } from '~types/network.interface';
Expand All @@ -15,6 +15,7 @@ import { QiDaoContractFactory } from '../contracts';
import { QI_DAO_DEFINITION } from '../qi-dao.definition';

export type QiDaoVaultPositionDataProps = {
assetStandard: Standard;
liquidity: number;
vaultInfoAddress: string;
};
Expand Down Expand Up @@ -83,6 +84,7 @@ export class QiDaoVaultPositionHelper {
tokens,

dataProps: {
assetStandard: Standard.ERC_721,
liquidity,
vaultInfoAddress,
},
Expand Down
6 changes: 6 additions & 0 deletions src/position/position.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ export enum MetaType {
NFT = 'nft',
}

export enum Standard {
ERC_20 = 'erc20',
ERC_721 = 'erc721',
ERC_1155 = 'erc1155',
}

export interface AbstractPosition<T = DefaultDataProps> extends Contract {
tokens: WithMetaType<Token>[];
dataProps: T;
Expand Down

0 comments on commit 5a8141e

Please sign in to comment.