diff --git a/services/gunDB/contact-api/utils/index.js b/services/gunDB/contact-api/utils/index.js index 0a802879..619b04d2 100644 --- a/services/gunDB/contact-api/utils/index.js +++ b/services/gunDB/contact-api/utils/index.js @@ -24,29 +24,6 @@ const delay = ms => new Promise(res => setTimeout(res, ms)) */ const mySecret = () => Promise.resolve(require('../../Mediator').getMySecret()) -/** - * @template T - * @param {Promise} promise - * @returns {Promise} - */ -const timeout10 = promise => { - /** @type {NodeJS.Timeout} */ - // @ts-ignore - let timeoutID - return Promise.race([ - promise.then(v => { - clearTimeout(timeoutID) - return v - }), - - new Promise((_, rej) => { - timeoutID = setTimeout(() => { - rej(new Error(Constants.ErrorCode.TIMEOUT_ERR)) - }, 10000) - }) - ]) -} - /** * @template T * @param {Promise} promise