From 0aa161dab96635bbd0d4dc7e85196d12f35a6024 Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Wed, 9 Oct 2024 17:01:17 +0100 Subject: [PATCH] go --- governance/pyth_staking_sdk/src/pyth-staking-client.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/governance/pyth_staking_sdk/src/pyth-staking-client.ts b/governance/pyth_staking_sdk/src/pyth-staking-client.ts index a13b2c38b..cd4317918 100644 --- a/governance/pyth_staking_sdk/src/pyth-staking-client.ts +++ b/governance/pyth_staking_sdk/src/pyth-staking-client.ts @@ -784,10 +784,11 @@ export class PythStakingClient { let lowestEpoch: bigint | undefined; for (const record of delegationRecords) { - if (record !== null) { - if (lowestEpoch === undefined || record.lastEpoch < lowestEpoch) { - lowestEpoch = record.lastEpoch; - } + if ( + record !== null && + (lowestEpoch === undefined || record.lastEpoch < lowestEpoch) + ) { + lowestEpoch = record.lastEpoch; } }