From 345c7b12d9de52c5b8740401c7d8843ec1aedbc1 Mon Sep 17 00:00:00 2001 From: Vincent Date: Wed, 22 Apr 2020 18:30:51 +1000 Subject: [PATCH] lint --- js/modules/loki_snode_api.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/js/modules/loki_snode_api.js b/js/modules/loki_snode_api.js index 4cd3f5a3f..38470d4ab 100644 --- a/js/modules/loki_snode_api.js +++ b/js/modules/loki_snode_api.js @@ -781,11 +781,14 @@ class LokiSnodeAPI { const nameHash = dcodeIO.ByteBuffer.wrap(output).toString('base64'); const timeoutResponse = { timedOut: true }; - const maxTimeoutVal = 2**31 - 1; + const maxTimeoutVal = 2 ** 31 - 1; const timeoutPromise = (cb, interval) => () => - new Promise(resolve => setTimeout(() => cb(resolve), interval || maxTimeoutVal)); + new Promise(resolve => + setTimeout(() => cb(resolve), interval || maxTimeoutVal) + ); const onTimeout = timeoutPromise( - resolve => resolve(timeoutResponse), timeout + resolve => resolve(timeoutResponse), + timeout ); // Get nodes capable of doing LNS @@ -857,7 +860,7 @@ class LokiSnodeAPI { const nodes = lnsNodes.splice(0, numRequests); // Start fetching from nodes - Promise.resolve(nodes.map(async node => fetchFromNode(node))); + nodes.map(async node => fetchFromNode(node)); // Timeouts (optional parameter) // Wait for cipher to be found; race against timeout