Skip to content

Commit

Permalink
tiny changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vsubhuman committed Dec 27, 2022
1 parent 258fedb commit 78a49f3
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2892,12 +2892,13 @@ function compareAndSetIfNewAddressSetHash(id: number, addresses: Array<string>):
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) {
// <TODO:REMOVE_AFTER_YOROI_LIB_UPGRADE>
console.debug('/// utxo state mut be cleared:', id, requestAddresseHash, prevRequestAddressHash);
localStorage.setItem(localStorageKey, requestAddresseHash);
return true;
}
return false;
return isUpdating;
}

async function rawUpdateUtxos(
Expand Down

0 comments on commit 78a49f3

Please sign in to comment.