From 194c9223393058ee1d29197130995ca9b03a5e52 Mon Sep 17 00:00:00 2001 From: Milan Steiner <69144826+msteiner96@users.noreply.github.com> Date: Wed, 13 Apr 2022 12:43:35 +0200 Subject: [PATCH] Update packages/stargate/src/stargateclient.ts Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> --- packages/stargate/src/stargateclient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/stargate/src/stargateclient.ts b/packages/stargate/src/stargateclient.ts index 5e4d1aee4e..0f259f3c9c 100644 --- a/packages/stargate/src/stargateclient.ts +++ b/packages/stargate/src/stargateclient.ts @@ -285,7 +285,7 @@ export class StargateClient { const loadedDelegations = delegationResponses || []; allDelegations.push(...loadedDelegations); startAtKey = pagination?.nextKey; - } while (startAtKey?.length !== 0 && startAtKey !== undefined); + } while (startAtKey !== undefined && startAtKey.length !== 0); const sumValues = allDelegations.reduce( (previousValue: Coin | null, currentValue: DelegationResponse): Coin => {