From d1a3dc30ce618a1b99d41214055f1d8e6e001846 Mon Sep 17 00:00:00 2001 From: William Poulin Date: Tue, 5 Dec 2023 13:30:48 -0500 Subject: [PATCH] chore(apps): Clean up labels (#3098) --- ...le.stk-abpt-claimable.contract-position-fetcher.ts | 2 +- .../aave-v2.claimable.contract-position-fetcher.ts | 10 +++++----- .../across/common/across.pool-v1.token-fetcher.ts | 2 +- .../across/common/across.pool-v2.token-fetcher.ts | 2 +- .../api3.staking.contract-position-fetcher.ts | 2 +- .../ethereum/arbor-finance.bond.token-fetcher.ts | 4 ++-- .../badger.claimable.contract-position-fetcher.ts | 5 ++--- .../common/badger.claimable.rewards-resolver.ts | 4 ++-- .../camelot.dividend.contract-position-fetcher.ts | 11 ++++++++--- .../common/cask-protocol.wallet.token-fetcher.ts | 11 ++++++++--- .../chicken-bond.bond.contract-position-fetcher.ts | 10 +++++++--- src/apps/ease/common/ease.rca.token-fetcher.ts | 2 +- .../gains-network.locked.contract-position-fetcher.ts | 2 +- .../geist.incentives.contract-position-fetcher.ts | 6 +++--- .../ethereum/hex.stake.contract-position-fetcher.ts | 2 +- .../idle.best-yield.contract-position-fetcher.ts | 2 +- .../impermax.borrow.contract-position-fetcher.ts | 3 +-- .../insurace/common/insurace.mining.token-fetcher.ts | 2 +- .../iq/ethereum/iq.hiiq.contract-position-fetcher.ts | 11 ++++++++--- ...on.stk-lyra-claimable.contract-position-fetcher.ts | 2 +- .../ethereum/opnx.veox.contract-position-fetcher.ts | 2 +- ...nguin.vault-claimable.contract-position-fetcher.ts | 2 +- .../plutus.tge-claimable.contract-position-fetcher.ts | 2 +- ...l-together-v3.airdrop.contract-position-fetcher.ts | 3 +-- ...together-v3.claimable.contract-position-fetcher.ts | 3 +-- .../rook.claimable.contract-position-fetcher.ts | 2 +- ...lo-finance.incentives.contract-position-fetcher.ts | 2 +- .../tokemak.claimable.contract-position-fetcher.ts | 2 +- ...rta.lending-pool-core.contract-position-fetcher.ts | 7 +------ 29 files changed, 65 insertions(+), 55 deletions(-) diff --git a/src/apps/aave-safety-module/ethereum/aave-safety-module.stk-abpt-claimable.contract-position-fetcher.ts b/src/apps/aave-safety-module/ethereum/aave-safety-module.stk-abpt-claimable.contract-position-fetcher.ts index c6b685cdc..f3faaa561 100644 --- a/src/apps/aave-safety-module/ethereum/aave-safety-module.stk-abpt-claimable.contract-position-fetcher.ts +++ b/src/apps/aave-safety-module/ethereum/aave-safety-module.stk-abpt-claimable.contract-position-fetcher.ts @@ -41,7 +41,7 @@ export class EthereumAaveSafetyModuleStkAbptClaimableContractPositionFetcher ext } async getLabel({ contractPosition }: GetDisplayPropsParams) { - return `Claimable ${getLabelFromToken(contractPosition.tokens[0])}`; + return getLabelFromToken(contractPosition.tokens[0]); } async getTokenBalancesPerPosition({ address, contract }: GetTokenBalancesParams) { diff --git a/src/apps/aave-v2/common/aave-v2.claimable.contract-position-fetcher.ts b/src/apps/aave-v2/common/aave-v2.claimable.contract-position-fetcher.ts index 7e0d74c6b..eb77a2756 100644 --- a/src/apps/aave-v2/common/aave-v2.claimable.contract-position-fetcher.ts +++ b/src/apps/aave-v2/common/aave-v2.claimable.contract-position-fetcher.ts @@ -3,6 +3,7 @@ import { BigNumberish } from 'ethers'; import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; import { buildDollarDisplayItem } from '~app-toolkit/helpers/presentation/display-item.present'; +import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; import { DisplayProps } from '~position/display.interface'; import { MetaType } from '~position/position.interface'; import { ContractPositionTemplatePositionFetcher } from '~position/template/contract-position.template.position-fetcher'; @@ -45,11 +46,10 @@ export abstract class AaveV2ClaimablePositionFetcher extends ContractPositionTem ]; } - async getLabel( - params: GetDisplayPropsParams, - ): Promise { - const rewardToken = params.contractPosition.tokens[0]; - return `Claimable ${rewardToken.symbol}`; + async getLabel({ + contractPosition, + }: GetDisplayPropsParams): Promise { + return getLabelFromToken(contractPosition.tokens[0]); } getContract(address: string) { diff --git a/src/apps/across/common/across.pool-v1.token-fetcher.ts b/src/apps/across/common/across.pool-v1.token-fetcher.ts index 3580fe4fe..fd3f9a2dc 100644 --- a/src/apps/across/common/across.pool-v1.token-fetcher.ts +++ b/src/apps/across/common/across.pool-v1.token-fetcher.ts @@ -56,6 +56,6 @@ export abstract class AcrossPoolV1TokenFetcher extends AppTokenTemplatePositionF } async getLabel({ appToken }: GetDisplayPropsParams): Promise { - return `${getLabelFromToken(appToken.tokens[0])} Pool (deprecated)`; + return getLabelFromToken(appToken.tokens[0]); } } diff --git a/src/apps/across/common/across.pool-v2.token-fetcher.ts b/src/apps/across/common/across.pool-v2.token-fetcher.ts index 6e830801f..b8c7902c8 100644 --- a/src/apps/across/common/across.pool-v2.token-fetcher.ts +++ b/src/apps/across/common/across.pool-v2.token-fetcher.ts @@ -62,6 +62,6 @@ export abstract class AcrossPoolV2TokenFetcher extends AppTokenTemplatePositionF } async getLabel({ appToken }: GetDisplayPropsParams): Promise { - return `${getLabelFromToken(appToken.tokens[0])} Pool`; + return getLabelFromToken(appToken.tokens[0]); } } diff --git a/src/apps/api3/ethereum/api3.staking.contract-position-fetcher.ts b/src/apps/api3/ethereum/api3.staking.contract-position-fetcher.ts index be77b2067..4e7c8325a 100644 --- a/src/apps/api3/ethereum/api3.staking.contract-position-fetcher.ts +++ b/src/apps/api3/ethereum/api3.staking.contract-position-fetcher.ts @@ -44,7 +44,7 @@ export class EthereumApi3StakingContractPositionFetcher extends ContractPosition } async getLabel({ contractPosition }: GetDisplayPropsParams) { - return `Staked ${getLabelFromToken(contractPosition.tokens[0])}`; + return getLabelFromToken(contractPosition.tokens[0]); } async getTokenBalancesPerPosition({ address, contract }: GetTokenBalancesParams) { diff --git a/src/apps/arbor-finance/ethereum/arbor-finance.bond.token-fetcher.ts b/src/apps/arbor-finance/ethereum/arbor-finance.bond.token-fetcher.ts index e433da820..1a384780d 100644 --- a/src/apps/arbor-finance/ethereum/arbor-finance.bond.token-fetcher.ts +++ b/src/apps/arbor-finance/ethereum/arbor-finance.bond.token-fetcher.ts @@ -1,5 +1,5 @@ import { Inject } from '@nestjs/common'; -import dayjs from 'dayjs'; +import dayjs, { unix } from 'dayjs'; import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; @@ -65,7 +65,7 @@ export class EthereumArborFinanceBondTokenFetcher extends AppTokenTemplatePositi async getPricePerShare({ definition, }: GetPricePerShareParams) { - const m = dayjs.unix(definition.maturityDate); + const m = unix(definition.maturityDate); const date = dayjs(new Date()); const yearsUntilMaturity = m.diff(date, 'year', true); const ytm = 1 / definition.clearingPrice - 1; diff --git a/src/apps/badger/common/badger.claimable.contract-position-fetcher.ts b/src/apps/badger/common/badger.claimable.contract-position-fetcher.ts index f3c994cf9..c076628d2 100644 --- a/src/apps/badger/common/badger.claimable.contract-position-fetcher.ts +++ b/src/apps/badger/common/badger.claimable.contract-position-fetcher.ts @@ -56,9 +56,8 @@ export abstract class BadgerClaimableContractPositionFetcher extends ContractPos ]; } - async getLabel(params: GetDisplayPropsParams): Promise { - const suppliedToken = params.contractPosition.tokens[0]; - return `Claimable ${getLabelFromToken(suppliedToken)}`; + async getLabel({ contractPosition }: GetDisplayPropsParams): Promise { + return getLabelFromToken(contractPosition.tokens[0]); } async getTokenBalancesPerPosition({ diff --git a/src/apps/badger/common/badger.claimable.rewards-resolver.ts b/src/apps/badger/common/badger.claimable.rewards-resolver.ts index 47a666b49..8a2370daa 100644 --- a/src/apps/badger/common/badger.claimable.rewards-resolver.ts +++ b/src/apps/badger/common/badger.claimable.rewards-resolver.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import Axios from 'axios'; -import { ethers } from 'ethers'; +import { getAddress } from 'viem'; import { Cache } from '~cache/cache.decorator'; import { Network } from '~types/network.interface'; @@ -27,7 +27,7 @@ export class BadgerClaimableRewardsResolver { ttl: 5 * 60, // 60 minutes }) private async getCachedAccumulatedRewardsData(_network: Network, address: string) { - const checksumAddress = ethers.utils.getAddress(address); + const checksumAddress = getAddress(address); const { data } = await Axios.get( `https://api.badger.finance/v2/reward/tree/${checksumAddress}`, ).catch(() => ({ data: { tokens: [] as string[], cumulativeAmounts: [] as string[] } })); diff --git a/src/apps/camelot/arbitrum/camelot.dividend.contract-position-fetcher.ts b/src/apps/camelot/arbitrum/camelot.dividend.contract-position-fetcher.ts index 88391fbd5..964975bf9 100644 --- a/src/apps/camelot/arbitrum/camelot.dividend.contract-position-fetcher.ts +++ b/src/apps/camelot/arbitrum/camelot.dividend.contract-position-fetcher.ts @@ -3,12 +3,17 @@ import { range } from 'lodash'; import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; +import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; import { DefaultDataProps } from '~position/display.interface'; import { MetaType } from '~position/position.interface'; import { isClaimable } from '~position/position.utils'; import { GetDefinitionsParams } from '~position/template/app-token.template.types'; import { ContractPositionTemplatePositionFetcher } from '~position/template/contract-position.template.position-fetcher'; -import { GetTokenBalancesParams, GetTokenDefinitionsParams } from '~position/template/contract-position.template.types'; +import { + GetDisplayPropsParams, + GetTokenBalancesParams, + GetTokenDefinitionsParams, +} from '~position/template/contract-position.template.types'; import { CamelotViemContractFactory } from '../contracts'; import { CamelotDividend } from '../contracts/viem'; @@ -75,8 +80,8 @@ export class ArbitrumCamelotDividendContractPositionFetcher extends ContractPosi ]; } - async getLabel() { - return `Dividends`; + async getLabel({ contractPosition }: GetDisplayPropsParams) { + return getLabelFromToken(contractPosition.tokens[0]); } async getTokenBalancesPerPosition({ address, contract, contractPosition }: GetTokenBalancesParams) { diff --git a/src/apps/cask-protocol/common/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/common/cask-protocol.wallet.token-fetcher.ts index 4063dd66c..4ce06770c 100644 --- a/src/apps/cask-protocol/common/cask-protocol.wallet.token-fetcher.ts +++ b/src/apps/cask-protocol/common/cask-protocol.wallet.token-fetcher.ts @@ -1,8 +1,13 @@ import { Inject } from '@nestjs/common'; import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; +import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; +import { + GetDisplayPropsParams, + GetPricePerShareParams, + GetUnderlyingTokensParams, +} from '~position/template/app-token.template.types'; import { CaskProtocolViemContractFactory } from '../contracts'; import { CaskVaultToken } from '../contracts/viem'; @@ -35,7 +40,7 @@ export abstract class CaskProtocolWalletTokenFetcher extends AppTokenTemplatePos return [pricePerShare]; } - async getLabel() { - return 'Cask Wallet'; + async getLabel({ appToken }: GetDisplayPropsParams) { + return getLabelFromToken(appToken.tokens[0]); } } diff --git a/src/apps/chicken-bond/ethereum/chicken-bond.bond.contract-position-fetcher.ts b/src/apps/chicken-bond/ethereum/chicken-bond.bond.contract-position-fetcher.ts index 0af503b97..a857820a2 100644 --- a/src/apps/chicken-bond/ethereum/chicken-bond.bond.contract-position-fetcher.ts +++ b/src/apps/chicken-bond/ethereum/chicken-bond.bond.contract-position-fetcher.ts @@ -4,10 +4,14 @@ import _, { range } from 'lodash'; import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; import { drillBalance } from '~app-toolkit/helpers/drill-balance.helper'; +import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; import { DefaultDataProps } from '~position/display.interface'; import { ContractPositionBalance } from '~position/position-balance.interface'; import { MetaType } from '~position/position.interface'; -import { DefaultContractPositionDefinition } from '~position/template/contract-position.template.types'; +import { + DefaultContractPositionDefinition, + GetDisplayPropsParams, +} from '~position/template/contract-position.template.types'; import { CustomContractPositionTemplatePositionFetcher } from '~position/template/custom-contract-position.template.position-fetcher'; import { ChickenBondViemContractFactory } from '../contracts'; @@ -53,8 +57,8 @@ export class EthereumChickenBondBondContractPositionFetcher extends CustomContra return this.contractFactory.chickenBondBondNft({ network: this.network, address }); } - async getLabel(): Promise { - return `LUSD Bond`; + async getLabel({ contractPosition }: GetDisplayPropsParams): Promise { + return getLabelFromToken(contractPosition.tokens[0]); } getTokenBalancesPerPosition(): never { diff --git a/src/apps/ease/common/ease.rca.token-fetcher.ts b/src/apps/ease/common/ease.rca.token-fetcher.ts index 366fd455a..54ffbed1d 100644 --- a/src/apps/ease/common/ease.rca.token-fetcher.ts +++ b/src/apps/ease/common/ease.rca.token-fetcher.ts @@ -62,6 +62,6 @@ export abstract class EaseRcaTokenFetcher extends AppTokenTemplatePositionFetche } async getLabel({ appToken }: GetDisplayPropsParams) { - return `${getLabelFromToken(appToken.tokens[0])} Ease Vault`; + return getLabelFromToken(appToken.tokens[0]); } } diff --git a/src/apps/gains-network/common/gains-network.locked.contract-position-fetcher.ts b/src/apps/gains-network/common/gains-network.locked.contract-position-fetcher.ts index 8c75fdd6f..279558308 100644 --- a/src/apps/gains-network/common/gains-network.locked.contract-position-fetcher.ts +++ b/src/apps/gains-network/common/gains-network.locked.contract-position-fetcher.ts @@ -48,7 +48,7 @@ export abstract class GainsNetworkLockedContractPositionFetcher extends CustomCo } async getLabel({ contractPosition }: GetDisplayPropsParams): Promise { - return `${getLabelFromToken(contractPosition.tokens[0])}`; + return getLabelFromToken(contractPosition.tokens[0]); } getTokenBalancesPerPosition(): never { diff --git a/src/apps/geist/fantom/geist.incentives.contract-position-fetcher.ts b/src/apps/geist/fantom/geist.incentives.contract-position-fetcher.ts index 6b6bc44db..20cb2849c 100644 --- a/src/apps/geist/fantom/geist.incentives.contract-position-fetcher.ts +++ b/src/apps/geist/fantom/geist.incentives.contract-position-fetcher.ts @@ -4,7 +4,7 @@ import { BigNumber } from 'ethers'; import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; import { buildDollarDisplayItem } from '~app-toolkit/helpers/presentation/display-item.present'; -import { getTokenImg } from '~app-toolkit/helpers/presentation/image.present'; +import { getLabelFromToken, getTokenImg } from '~app-toolkit/helpers/presentation/image.present'; import { DisplayProps } from '~position/display.interface'; import { MetaType } from '~position/position.interface'; import { ContractPositionTemplatePositionFetcher } from '~position/template/contract-position.template.position-fetcher'; @@ -47,8 +47,8 @@ export class FantomGeistIncentivesPositionFetcher extends ContractPositionTempla ]; } - async getLabel(): Promise { - return 'Claimable GEIST'; + async getLabel({ contractPosition }: GetDisplayPropsParams): Promise { + return getLabelFromToken(contractPosition.tokens[0]); } async getSecondaryLabel(params: GetDisplayPropsParams): Promise { diff --git a/src/apps/hex/ethereum/hex.stake.contract-position-fetcher.ts b/src/apps/hex/ethereum/hex.stake.contract-position-fetcher.ts index c770015fb..a65051bc7 100644 --- a/src/apps/hex/ethereum/hex.stake.contract-position-fetcher.ts +++ b/src/apps/hex/ethereum/hex.stake.contract-position-fetcher.ts @@ -71,7 +71,7 @@ export class EthereumHexStakeContractPositionFetcher extends ContractPositionTem } async getLabel({ contractPosition }: GetDisplayPropsParams) { - return `Staked ${getLabelFromToken(contractPosition.tokens[0])}`; + return getLabelFromToken(contractPosition.tokens[0]); } async getTokenBalancesPerPosition({ address, contract }: GetTokenBalancesParams) { diff --git a/src/apps/idle/ethereum/idle.best-yield.contract-position-fetcher.ts b/src/apps/idle/ethereum/idle.best-yield.contract-position-fetcher.ts index 6a5608608..5da583745 100644 --- a/src/apps/idle/ethereum/idle.best-yield.contract-position-fetcher.ts +++ b/src/apps/idle/ethereum/idle.best-yield.contract-position-fetcher.ts @@ -82,7 +82,7 @@ export class EthereumIdleBestYieldContractPositionFetcher extends ContractPositi } async getLabel({ contractPosition }: GetDisplayPropsParams) { - return `${getLabelFromToken(contractPosition.tokens[0])}`; + return getLabelFromToken(contractPosition.tokens[0]); } async getTokenBalancesPerPosition({ address, contract }: GetTokenBalancesParams) { diff --git a/src/apps/impermax/common/impermax.borrow.contract-position-fetcher.ts b/src/apps/impermax/common/impermax.borrow.contract-position-fetcher.ts index 3d248df12..51ebe69b3 100644 --- a/src/apps/impermax/common/impermax.borrow.contract-position-fetcher.ts +++ b/src/apps/impermax/common/impermax.borrow.contract-position-fetcher.ts @@ -60,8 +60,7 @@ export abstract class ImpermaxBorrowContractPositionFetcher extends ContractPosi } async getLabel({ contractPosition }: GetDisplayPropsParams): Promise { - const [underlyingToken] = contractPosition.tokens; - return getLabelFromToken(underlyingToken); + return getLabelFromToken(contractPosition.tokens[0]); } async getSecondaryLabel({ diff --git a/src/apps/insurace/common/insurace.mining.token-fetcher.ts b/src/apps/insurace/common/insurace.mining.token-fetcher.ts index 348f25f4d..965178f0c 100644 --- a/src/apps/insurace/common/insurace.mining.token-fetcher.ts +++ b/src/apps/insurace/common/insurace.mining.token-fetcher.ts @@ -98,6 +98,6 @@ export abstract class InsuraceMiningTokenFetcher extends AppTokenTemplatePositio } async getLabel({ appToken }: GetDisplayPropsParams) { - return `${getLabelFromToken(appToken.tokens[0])} Pool`; + return getLabelFromToken(appToken.tokens[0]); } } diff --git a/src/apps/iq/ethereum/iq.hiiq.contract-position-fetcher.ts b/src/apps/iq/ethereum/iq.hiiq.contract-position-fetcher.ts index ccb6715e8..0c79afdfd 100644 --- a/src/apps/iq/ethereum/iq.hiiq.contract-position-fetcher.ts +++ b/src/apps/iq/ethereum/iq.hiiq.contract-position-fetcher.ts @@ -3,9 +3,14 @@ import { ethers } from 'ethers'; import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; +import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; import { MetaType } from '~position/position.interface'; import { ContractPositionTemplatePositionFetcher } from '~position/template/contract-position.template.position-fetcher'; -import { GetDataPropsParams, GetTokenBalancesParams } from '~position/template/contract-position.template.types'; +import { + GetDataPropsParams, + GetDisplayPropsParams, + GetTokenBalancesParams, +} from '~position/template/contract-position.template.types'; import { IqViemContractFactory } from '../contracts'; import { IqHiiq } from '../contracts/viem'; @@ -39,8 +44,8 @@ export class EthereumIqHiiqContractPositionFetcher extends ContractPositionTempl ]; } - async getLabel() { - return `HiIQ Lock`; + async getLabel({ contractPosition }: GetDisplayPropsParams): Promise { + return getLabelFromToken(contractPosition.tokens[0]); } async getDataProps(_params: GetDataPropsParams) { diff --git a/src/apps/lyra-avalon/common/lyra-avalon.stk-lyra-claimable.contract-position-fetcher.ts b/src/apps/lyra-avalon/common/lyra-avalon.stk-lyra-claimable.contract-position-fetcher.ts index caf1ba59f..8e50a4d55 100644 --- a/src/apps/lyra-avalon/common/lyra-avalon.stk-lyra-claimable.contract-position-fetcher.ts +++ b/src/apps/lyra-avalon/common/lyra-avalon.stk-lyra-claimable.contract-position-fetcher.ts @@ -45,7 +45,7 @@ export abstract class LyraAvalonStkLyraClaimableContractPositionFetcher extends } async getLabel({ contractPosition }: GetDisplayPropsParams) { - return `Claimable ${getLabelFromToken(contractPosition.tokens[0])}`; + return getLabelFromToken(contractPosition.tokens[0]); } async getTokenBalancesPerPosition({ address, contract }: GetTokenBalancesParams) { diff --git a/src/apps/opnx/ethereum/opnx.veox.contract-position-fetcher.ts b/src/apps/opnx/ethereum/opnx.veox.contract-position-fetcher.ts index 64fa8f5e9..13b29cf89 100644 --- a/src/apps/opnx/ethereum/opnx.veox.contract-position-fetcher.ts +++ b/src/apps/opnx/ethereum/opnx.veox.contract-position-fetcher.ts @@ -39,6 +39,6 @@ export class EthereumOpnxContractPositionFetcher extends VotingEscrowTemplateCon } async getLabel({ contractPosition }: GetDisplayPropsParams) { - return `Staked ${getLabelFromToken(contractPosition.tokens[0])}`; + return getLabelFromToken(contractPosition.tokens[0]); } } diff --git a/src/apps/penguin/avalanche/penguin.vault-claimable.contract-position-fetcher.ts b/src/apps/penguin/avalanche/penguin.vault-claimable.contract-position-fetcher.ts index 11cbe569d..90a14c002 100644 --- a/src/apps/penguin/avalanche/penguin.vault-claimable.contract-position-fetcher.ts +++ b/src/apps/penguin/avalanche/penguin.vault-claimable.contract-position-fetcher.ts @@ -41,7 +41,7 @@ export class AvalanchePenguinVaultClaimableContractPositionFetcher extends Contr } async getLabel({ contractPosition }: GetDisplayPropsParams) { - return `Claimable ${getLabelFromToken(contractPosition.tokens[0])}`; + return getLabelFromToken(contractPosition.tokens[0]); } async getTokenBalancesPerPosition({ address, contract }: GetTokenBalancesParams) { diff --git a/src/apps/plutus/arbitrum/plutus.tge-claimable.contract-position-fetcher.ts b/src/apps/plutus/arbitrum/plutus.tge-claimable.contract-position-fetcher.ts index 0a08bce0d..94d019dea 100644 --- a/src/apps/plutus/arbitrum/plutus.tge-claimable.contract-position-fetcher.ts +++ b/src/apps/plutus/arbitrum/plutus.tge-claimable.contract-position-fetcher.ts @@ -46,7 +46,7 @@ export class ArbitrumPlutusTgeClaimableContractPositionFetcher extends ContractP } async getLabel({ contractPosition }: GetDisplayPropsParams) { - return `Claimable ${getLabelFromToken(contractPosition.tokens[0])}`; + return getLabelFromToken(contractPosition.tokens[0]); } async getTokenBalancesPerPosition({ address, contract }: GetTokenBalancesParams) { diff --git a/src/apps/pool-together-v3/common/pool-together-v3.airdrop.contract-position-fetcher.ts b/src/apps/pool-together-v3/common/pool-together-v3.airdrop.contract-position-fetcher.ts index 1afd5a13d..b0713802b 100644 --- a/src/apps/pool-together-v3/common/pool-together-v3.airdrop.contract-position-fetcher.ts +++ b/src/apps/pool-together-v3/common/pool-together-v3.airdrop.contract-position-fetcher.ts @@ -65,8 +65,7 @@ export abstract class PoolTogetherV3AirdropContractPositionFetcher extends Contr } async getLabel({ contractPosition }: GetDisplayPropsParams) { - const rewardToken = contractPosition.tokens[0]; - return `Claimable ${getLabelFromToken(rewardToken)}`; + return getLabelFromToken(contractPosition.tokens[0]); } async getTokenBalancesPerPosition({ diff --git a/src/apps/pool-together-v3/common/pool-together-v3.claimable.contract-position-fetcher.ts b/src/apps/pool-together-v3/common/pool-together-v3.claimable.contract-position-fetcher.ts index 738e1bb2a..d9d388b58 100644 --- a/src/apps/pool-together-v3/common/pool-together-v3.claimable.contract-position-fetcher.ts +++ b/src/apps/pool-together-v3/common/pool-together-v3.claimable.contract-position-fetcher.ts @@ -55,8 +55,7 @@ export abstract class PoolTogetherV3ClaimableContractPositionFetcher extends Con } async getLabel({ contractPosition }: GetDisplayPropsParams) { - const rewardToken = contractPosition.tokens[0]; - return `Claimable ${getLabelFromToken(rewardToken)}`; + return getLabelFromToken(contractPosition.tokens[0]); } async getTokenBalancesPerPosition({ diff --git a/src/apps/rook/ethereum/rook.claimable.contract-position-fetcher.ts b/src/apps/rook/ethereum/rook.claimable.contract-position-fetcher.ts index 766e7dc16..64b5c395a 100644 --- a/src/apps/rook/ethereum/rook.claimable.contract-position-fetcher.ts +++ b/src/apps/rook/ethereum/rook.claimable.contract-position-fetcher.ts @@ -93,7 +93,7 @@ export class EthereumRookClaimableContractPositionFetcher extends ContractPositi } async getLabel({ contractPosition }: GetDisplayPropsParams) { - return `Claimable ${getLabelFromToken(contractPosition.tokens[0])}`; + return getLabelFromToken(contractPosition.tokens[0]); } async getTokenBalancesPerPosition({ diff --git a/src/apps/silo-finance/common/silo-finance.incentives.contract-position-fetcher.ts b/src/apps/silo-finance/common/silo-finance.incentives.contract-position-fetcher.ts index 69b88e0e6..73ce6fd6a 100644 --- a/src/apps/silo-finance/common/silo-finance.incentives.contract-position-fetcher.ts +++ b/src/apps/silo-finance/common/silo-finance.incentives.contract-position-fetcher.ts @@ -74,7 +74,7 @@ export abstract class SiloFinanceIncentivesContractPositionfetcher extends Contr } async getLabel({ contractPosition }: GetDisplayPropsParams) { - return `Claimable ${getLabelFromToken(contractPosition.tokens[0])}`; + return getLabelFromToken(contractPosition.tokens[0]); } async getTokenBalancesPerPosition({ diff --git a/src/apps/tokemak/ethereum/tokemak.claimable.contract-position-fetcher.ts b/src/apps/tokemak/ethereum/tokemak.claimable.contract-position-fetcher.ts index 3bd6658b3..551cf2adc 100644 --- a/src/apps/tokemak/ethereum/tokemak.claimable.contract-position-fetcher.ts +++ b/src/apps/tokemak/ethereum/tokemak.claimable.contract-position-fetcher.ts @@ -47,7 +47,7 @@ export class EthereumTokemakClaimableContractPositionFetcher extends ContractPos } async getLabel({ contractPosition }: GetDisplayPropsParams) { - return `Claimable ${getLabelFromToken(contractPosition.tokens[0])}`; + return getLabelFromToken(contractPosition.tokens[0]); } async getTokenBalancesPerPosition({ diff --git a/src/apps/zharta/ethereum/zharta.lending-pool-core.contract-position-fetcher.ts b/src/apps/zharta/ethereum/zharta.lending-pool-core.contract-position-fetcher.ts index 7156fee47..8fc5f2a64 100644 --- a/src/apps/zharta/ethereum/zharta.lending-pool-core.contract-position-fetcher.ts +++ b/src/apps/zharta/ethereum/zharta.lending-pool-core.contract-position-fetcher.ts @@ -80,12 +80,7 @@ export class EthereumZhartaLendingPoolCoreContractPositionFetcher extends Contra return `${getLabelFromToken(suppliedToken)} Pool`; } - async getTokenBalancesPerPosition({ - address, - contractPosition, - contract, - multicall, - }: GetTokenBalancesParams) { + async getTokenBalancesPerPosition({ address, contract }: GetTokenBalancesParams) { const [lenderFundsRaw, withdrawableAmountRaw] = await Promise.all([ contract.read.funds([address]), contract.read.computeWithdrawableAmount([address]),