From 15dd895c2f6f0655476b44e9d27cd0fcfc5e5201 Mon Sep 17 00:00:00 2001 From: Andrei O Date: Thu, 12 Sep 2024 17:10:38 +0300 Subject: [PATCH] gate: Add an initial value to this "reduce()" call. --- src/utils/wallet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/wallet.ts b/src/utils/wallet.ts index 86ec2b8..8bd9805 100644 --- a/src/utils/wallet.ts +++ b/src/utils/wallet.ts @@ -4,7 +4,7 @@ import { mainNets } from '@/utils/networks'; let provider: ethers.JsonRpcProvider | null = null -const bigIntMax = (...args: bigint[]) => args.reduce((m, e) => e > m ? e : m); +const bigIntMax = (...args: bigint[]) => args.reduce((m, e) => e > m ? e : m, BigInt(0)) export const getCurrentProvider = async () => { const network = await getSelectedNetwork()