Update packages/stargate/src/stargateclient.ts

Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>
This commit is contained in:
Milan Steiner 2022-04-13 12:43:35 +02:00 committed by GitHub
parent 5d299476ba
commit 194c922339
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 => {