From f073039dc045550a91ccc35a9deed365d647567a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Tue, 11 Sep 2018 08:08:12 +0200 Subject: [PATCH] Use SYNC_TIMEOUT in query.complete().execute() too --- src/helpers/libcore.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/libcore.js b/src/helpers/libcore.js index 5f7f20e5..8be72a98 100644 --- a/src/helpers/libcore.js +++ b/src/helpers/libcore.js @@ -7,7 +7,7 @@ import { BigNumber } from 'bignumber.js' import Btc from '@ledgerhq/hw-app-btc' import { withDevice } from 'helpers/deviceAccess' import { getCryptoCurrencyById } from '@ledgerhq/live-common/lib/helpers/currencies' -import { SHOW_LEGACY_NEW_ACCOUNT } from 'config/constants' +import { SHOW_LEGACY_NEW_ACCOUNT, SYNC_TIMEOUT } from 'config/constants' import type { AccountRaw, OperationRaw, OperationType } from '@ledgerhq/live-common/lib/types' import type { NJSAccount, NJSOperation } from '@ledgerhq/ledger-core/src/ledgercore_doc' @@ -546,7 +546,7 @@ export async function syncAccount({ unsub() const query = njsAccount.queryOperations() - const ops = await timeoutTagged('ops', 5 * 60 * 1000, query.complete().execute()) + const ops = await timeoutTagged('ops', SYNC_TIMEOUT, query.complete().execute()) const njsBalance = await timeoutTagged('getBalance', 10000, njsAccount.getBalance()) const syncedRawAccount = await buildAccountRaw({