From 0ff0a80ef1a38f7779adc2d0c76c972c667fe7bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Fri, 20 Jul 2018 12:05:33 +0200 Subject: [PATCH] Fix edge-case in sync --- src/bridge/BridgeSyncContext.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bridge/BridgeSyncContext.js b/src/bridge/BridgeSyncContext.js index 99099fb0..0a1181c7 100644 --- a/src/bridge/BridgeSyncContext.js +++ b/src/bridge/BridgeSyncContext.js @@ -3,7 +3,6 @@ // it handles automatically re-calling synchronize // this is an even high abstraction than the bridge -import invariant from 'invariant' import logger from 'logger' import shuffle from 'lodash/shuffle' import { timeout } from 'rxjs/operators/timeout' @@ -67,7 +66,10 @@ class Provider extends Component { return } const account = this.props.accounts.find(a => a.id === accountId) - invariant(account, 'account not found') + if (!account) { + next() + return + } const bridge = getBridgeForCurrency(account.currency)