From bbba8b23a5f452b6d14bbe5dc0c3a81f1d04e250 Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Wed, 9 Oct 2024 18:44:18 +0100 Subject: [PATCH] go --- governance/pyth_staking_sdk/src/pyth-staking-client.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/governance/pyth_staking_sdk/src/pyth-staking-client.ts b/governance/pyth_staking_sdk/src/pyth-staking-client.ts index 91deb68d7..855c53357 100644 --- a/governance/pyth_staking_sdk/src/pyth-staking-client.ts +++ b/governance/pyth_staking_sdk/src/pyth-staking-client.ts @@ -702,7 +702,7 @@ export class PythStakingClient { ), ); - const max = (a : bigint | undefined, b: bigint | undefined) => { + const bigintMax = (a : bigint | undefined, b: bigint | undefined) => { if (a === undefined) { return b; } @@ -713,8 +713,8 @@ export class PythStakingClient { } const lowestEpoch = publishers.reduce((min, publisher, index) => { - const maximum = max(publisher.lowestEpoch, delegationRecords[index]?.lastEpoch); - return (min === undefined || (maximum !== undefined && maximum < min)) ? publisher.lowestEpoch : min, undefined as bigint| undefined + const maximum = bigintMax(publisher.lowestEpoch, delegationRecords[index]?.lastEpoch); + return (min === undefined || (maximum !== undefined && maximum < min)) ? maximum : min; }, undefined); const currentEpoch = await getCurrentEpoch(this.connection);