From 342210aac844c573c1f115655227bb20c66f2eaa Mon Sep 17 00:00:00 2001 From: Milan Steiner <69144826+msteiner96@users.noreply.github.com> Date: Wed, 13 Apr 2022 12:43:42 +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 | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/stargate/src/stargateclient.ts b/packages/stargate/src/stargateclient.ts index 0f259f3c..9a1ccf12 100644 --- a/packages/stargate/src/stargateclient.ts +++ b/packages/stargate/src/stargateclient.ts @@ -289,6 +289,7 @@ export class StargateClient { const sumValues = allDelegations.reduce( (previousValue: Coin | null, currentValue: DelegationResponse): Coin => { + // Safe because field is set to non-nullable (https://github.com/cosmos/cosmos-sdk/blob/v0.45.3/proto/cosmos/staking/v1beta1/staking.proto#L295) assert(currentValue.balance); return previousValue !== null ? this.addCoins(previousValue, currentValue.balance)