pull/294/head
Beaudan 6 years ago
parent c27d1ef69a
commit dbcaaf98dc

@ -160,7 +160,10 @@ class LokiMessageAPI {
// Make sure we aren't doing too much PoW // Make sure we aren't doing too much PoW
const currentDifficulty = window.storage.get('PoWDifficulty', null); const currentDifficulty = window.storage.get('PoWDifficulty', null);
const newDifficulty = result.difficulty; const newDifficulty = result.difficulty;
if (!Number.isNaN(newDifficulty) && newDifficulty !== currentDifficulty) { if (
!Number.isNaN(newDifficulty) &&
newDifficulty !== currentDifficulty
) {
window.storage.put('PoWDifficulty', newDifficulty); window.storage.put('PoWDifficulty', newDifficulty);
} }
return true; return true;

@ -19,7 +19,7 @@ const decryptResponse = async (response, address) => {
log.warn(`Could not decrypt response from ${address}`, e); log.warn(`Could not decrypt response from ${address}`, e);
} }
return {}; return {};
} };
// A small wrapper around node-fetch which deserializes response // A small wrapper around node-fetch which deserializes response
const fetch = async (url, options = {}) => { const fetch = async (url, options = {}) => {

Loading…
Cancel
Save