From b8ed01953494bf4e77501035d9727f4d4cac9695 Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Tue, 26 May 2020 19:35:46 -0700 Subject: [PATCH] remove stale comment, use window.lokiSnodeAPI.getOnionRequestNumber --- js/modules/loki_rpc.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/js/modules/loki_rpc.js b/js/modules/loki_rpc.js index 7234f2141..93739cdfc 100644 --- a/js/modules/loki_rpc.js +++ b/js/modules/loki_rpc.js @@ -11,13 +11,9 @@ const snodeHttpsAgent = new https.Agent({ const endpointBase = '/storage_rpc/v1'; -// Request index for debugging -let onionReqIdx = 0; - // Returns the actual ciphertext, symmetric key that will be used // for decryption, and an ephemeral_key to send to the next hop const encryptForPubKey = async (pubKeyX25519hex, reqObj) => { - // Do we still need "headers"? const reqStr = JSON.stringify(reqObj); const textEncoder = new TextEncoder(); @@ -704,8 +700,7 @@ const lokiFetch = async (url, options = {}, targetNode = null) => { // Get a path excluding `targetNode`: // eslint-disable-next-line no-await-in-loop const path = await lokiSnodeAPI.getOnionPath(targetNode); - const thisIdx = onionReqIdx; - onionReqIdx += 1; + const thisIdx = window.lokiSnodeAPI.getOnionRequestNumber(); // eslint-disable-next-line no-await-in-loop const result = await sendOnionRequestSnodeDest(