diff --git a/lib/connextclient/ConnextClient.ts b/lib/connextclient/ConnextClient.ts index b5c38b15f..ad7838e1a 100644 --- a/lib/connextclient/ConnextClient.ts +++ b/lib/connextclient/ConnextClient.ts @@ -469,13 +469,16 @@ class ConnextClient extends SwapClient { } const ethBalance$ = interval(30000).pipe( mergeMap(() => from(this.getBalanceForAddress(this.channelAddress!))), + // only emit new ETH balance events when the balance changes distinctUntilChanged(), ); this._reconcileDepositSubscriber = ethBalance$ + // when ETH balance changes .pipe( mergeMap(() => { if (this.status === ClientStatus.ConnectionVerified) { return defer(() => { + // create new commitment transaction return from( this.sendRequest('/deposit', 'POST', { channelAddress: this.channelAddress,