From 78a49f3a670234f52557fb9279218ed93af3af60 Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Tue, 27 Dec 2022 17:08:34 +0300 Subject: [PATCH] tiny changes --- .../app/api/ada/lib/storage/bridge/updateTransactions.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/yoroi-extension/app/api/ada/lib/storage/bridge/updateTransactions.js b/packages/yoroi-extension/app/api/ada/lib/storage/bridge/updateTransactions.js index 4daa0270ff..f83e472d5a 100644 --- a/packages/yoroi-extension/app/api/ada/lib/storage/bridge/updateTransactions.js +++ b/packages/yoroi-extension/app/api/ada/lib/storage/bridge/updateTransactions.js @@ -2892,12 +2892,13 @@ function compareAndSetIfNewAddressSetHash(id: number, addresses: Array): const requestAddresseHash = ObjectHash.sha1(requestAddresseSet); const localStorageKey = `TMP/UTXO_REQUEST_ADDRESSES_HASH/${id}`; const prevRequestAddressHash = localStorage.getItem(localStorageKey); - if (prevRequestAddressHash == null || prevRequestAddressHash !== requestAddresseHash) { - console.log('[rawUpdateUtxos] clearing utxo state.', requestAddresseHash, prevRequestAddressHash); + const isUpdating = prevRequestAddressHash == null || prevRequestAddressHash !== requestAddresseHash; + if (isUpdating) { + // + console.debug('/// utxo state mut be cleared:', id, requestAddresseHash, prevRequestAddressHash); localStorage.setItem(localStorageKey, requestAddresseHash); - return true; } - return false; + return isUpdating; } async function rawUpdateUtxos(