diff --git a/js/modules/loki_app_dot_net_api.js b/js/modules/loki_app_dot_net_api.js index 637b75962..a9c92933c 100644 --- a/js/modules/loki_app_dot_net_api.js +++ b/js/modules/loki_app_dot_net_api.js @@ -61,7 +61,7 @@ const sendViaOnion = async (srvPubKey, url, fetchOptions, options = {}) => { // eslint-disable-next-line no-param-reassign options.retry = 0; // eslint-disable-next-line no-param-reassign - options.requestNumber = window.lokiSnodeAPI.getOnionRequestNumber(); + options.requestNumber = window.lokiSnodeAPI.assignOnionRequestNumber(); } const payloadObj = { diff --git a/js/modules/loki_rpc.js b/js/modules/loki_rpc.js index 93739cdfc..dfbce16ae 100644 --- a/js/modules/loki_rpc.js +++ b/js/modules/loki_rpc.js @@ -700,7 +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 = window.lokiSnodeAPI.getOnionRequestNumber(); + const thisIdx = window.lokiSnodeAPI.assignOnionRequestNumber(); // eslint-disable-next-line no-await-in-loop const result = await sendOnionRequestSnodeDest( diff --git a/js/modules/loki_snode_api.js b/js/modules/loki_snode_api.js index 75487a226..d6d030493 100644 --- a/js/modules/loki_snode_api.js +++ b/js/modules/loki_snode_api.js @@ -188,7 +188,7 @@ class LokiSnodeAPI { this.onionRequestCounter = 0; // Request index for debugging } - getOnionRequestNumber() { + assignOnionRequestNumber() { this.onionRequestCounter += 1; return this.onionRequestCounter; }