From bec29beecb6058ade9bd56ceb157b5b886dc7b9b Mon Sep 17 00:00:00 2001 From: gomes <17035424+gomesalexandre@users.noreply.github.com> Date: Mon, 27 Mar 2023 19:32:13 +0200 Subject: [PATCH] feat(investor-idle): add active property --- packages/investor-idle/src/IdleOpportunity.ts | 2 ++ packages/investor-idle/src/constants/availableTokens.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/packages/investor-idle/src/IdleOpportunity.ts b/packages/investor-idle/src/IdleOpportunity.ts index ac81a6539..2f28bd152 100644 --- a/packages/investor-idle/src/IdleOpportunity.ts +++ b/packages/investor-idle/src/IdleOpportunity.ts @@ -80,6 +80,7 @@ export class IdleOpportunity /** * Opportunity id e.g., contract address or validator address */ + readonly active: boolean readonly id: string readonly version: string readonly strategy: string @@ -146,6 +147,7 @@ export class IdleOpportunity // this.metadata = vault.metadata this.id = toLower(vault.address) + this.active = !vault.isPaused this.metadata = { ...vault, apy: { diff --git a/packages/investor-idle/src/constants/availableTokens.ts b/packages/investor-idle/src/constants/availableTokens.ts index 760dbd9a5..7d07b048e 100644 --- a/packages/investor-idle/src/constants/availableTokens.ts +++ b/packages/investor-idle/src/constants/availableTokens.ts @@ -19,6 +19,7 @@ export interface IdleVault { underlyingTVL: number underlyingAddress: string externalIntegration: boolean + isPaused: boolean } export const baseUrl = 'https://api.idle.finance/'