From e00a22a3293c732d9eb7856170c9044efa5a810d Mon Sep 17 00:00:00 2001 From: gmbronco <83549293+gmbronco@users.noreply.github.com> Date: Thu, 5 Oct 2023 15:29:19 +0200 Subject: [PATCH] fix: include protocol swap fee --- balancer-js/src/modules/pools/apr/apr.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/balancer-js/src/modules/pools/apr/apr.ts b/balancer-js/src/modules/pools/apr/apr.ts index 54d76c8ef..dad2a902d 100644 --- a/balancer-js/src/modules/pools/apr/apr.ts +++ b/balancer-js/src/modules/pools/apr/apr.ts @@ -504,18 +504,13 @@ export class PoolApr { } private async protocolSwapFeePercentage(pool: Pool) { - let fee; - if ( - pool.poolType == 'ComposableStable' || - (pool.poolType == 'Weighted' && pool.poolTypeVersion == 2) - ) { - fee = 0; - } else if (pool.poolType.includes('Gyro') && this.gyroConfigRepository) { + let fee = 0.5; + if (pool.poolType.includes('Gyro') && this.gyroConfigRepository) { fee = await this.gyroConfigRepository.getGyroProtocolFee(pool.address); } else if (pool.protocolSwapFeeCache) { fee = parseFloat(pool.protocolSwapFeeCache); } else { - fee = (await this.feeCollector.find('')) || 0; + fee = (await this.feeCollector.find('')) || 0.5; } return fee; }