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

Commit

Permalink
feat(synthetix): Fix logos
Browse files Browse the repository at this point in the history
  • Loading branch information
immasandwich committed Nov 17, 2022
1 parent f68049f commit ff66e2d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/apps/synthetix/common/synthetix.snx.token-fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import { Inject } from '@nestjs/common';
import { BigNumberish } from 'ethers';

import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface';
import { getTokenImg } from '~app-toolkit/helpers/presentation/image.present';
import { IMulticallWrapper } from '~multicall';
import { DefaultDataProps } from '~position/display.interface';
import { AppTokenPosition } from '~position/position.interface';
import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher';
import { GetDataPropsParams, GetPriceParams } from '~position/template/app-token.template.types';
import { GetDataPropsParams, GetDisplayPropsParams, GetPriceParams } from '~position/template/app-token.template.types';

import { SynthetixContractFactory, SynthetixNetworkToken } from '../contracts';

Expand Down Expand Up @@ -59,6 +60,10 @@ export abstract class SynthetixSnxTokenFetcher extends AppTokenTemplatePositionF
return { ...defaultDataProps, exchangeable: this.isExchangeable };
}

async getImages({ appToken }: GetDisplayPropsParams<SynthetixNetworkToken>) {
return [getTokenImg(appToken.address, this.network)];
}

async getBalancePerToken({
address,
appToken,
Expand Down
6 changes: 6 additions & 0 deletions src/apps/synthetix/common/synthetix.synth.token-fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import { Inject, Injectable } from '@nestjs/common';
import { ethers } from 'ethers';

import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface';
import { getTokenImg } from '~app-toolkit/helpers/presentation/image.present';
import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher';
import {
GetAddressesParams,
DefaultAppTokenDefinition,
GetDataPropsParams,
DefaultAppTokenDataProps,
GetPriceParams,
GetDisplayPropsParams,
} from '~position/template/app-token.template.types';

import { SynthetixContractFactory, SynthetixSynthToken } from '../contracts';
Expand Down Expand Up @@ -119,4 +121,8 @@ export abstract class SynthetixSynthTokenFetcher extends AppTokenTemplatePositio
const defaultDataProps = await super.getDataProps(params);
return { ...defaultDataProps, exchangeable: this.isExchangeable };
}

async getImages({ appToken }: GetDisplayPropsParams<SynthetixSynthToken>) {
return [getTokenImg(appToken.address, this.network)];
}
}

0 comments on commit ff66e2d

Please sign in to comment.