From e6d56afc67e86f4c3ce63d59b50be74315f43845 Mon Sep 17 00:00:00 2001 From: GrandSchtroumpf Date: Thu, 15 Feb 2024 18:06:34 +0100 Subject: [PATCH] modify active strategy filter --- .../carbon-defi.strategy.contract-position-fetcher.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/apps/carbon-defi/ethereum/carbon-defi.strategy.contract-position-fetcher.ts b/src/apps/carbon-defi/ethereum/carbon-defi.strategy.contract-position-fetcher.ts index 7ac51f06f..ee412899d 100644 --- a/src/apps/carbon-defi/ethereum/carbon-defi.strategy.contract-position-fetcher.ts +++ b/src/apps/carbon-defi/ethereum/carbon-defi.strategy.contract-position-fetcher.ts @@ -38,7 +38,7 @@ type StrategyProps = { }; function isActiveStrategy([buy, sell]: readonly [Order, Order]) { - return !!buy.A || !!buy.B || !!sell.A || !!sell.B; + return !!buy.y || !!sell.y; } @PositionTemplate() @@ -81,7 +81,10 @@ export class EthereumCarbonDefiStrategyContractPositionFetcher extends CustomCon const strategies = await Promise.all(getStrategies).then(matrix => matrix.flat()); const definitions: StrategyDefinition[] = []; for (const { id, owner, tokens, orders } of strategies) { - if (!isActiveStrategy(orders)) continue; + if (!isActiveStrategy(orders)) { + console.log('inactive', id); + continue; + } definitions.push({ address, positionKey: id, owner, tokens }); } return definitions;