From 5c187e7a47ee00d7dd3371bd42754654dcba95dc Mon Sep 17 00:00:00 2001 From: Hayden Young Date: Fri, 15 Dec 2023 16:44:01 +0000 Subject: [PATCH] refactor: Remove timeout settings from ipfs block storage. --- src/storage/ipfs-block.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/storage/ipfs-block.js b/src/storage/ipfs-block.js index 1b13ee6..a59abbb 100644 --- a/src/storage/ipfs-block.js +++ b/src/storage/ipfs-block.js @@ -7,15 +7,12 @@ import { CID } from 'multiformats/cid' import { base58btc } from 'multiformats/bases/base58' -const defaultTimeout = 30000 - /** * Creates an instance of IPFSBlockStorage. * @function * @param {Object} params One or more parameters for configuring * IPFSBlockStorage. * @param {IPFS} params.ipfs An IPFS instance. - * @param {number} [params.timeout=defaultTimeout] A timeout in ms. * @param {boolean} [params.pin=false] True, if the block should be pinned, * false otherwise. * @return {module:Storage.Storage-IPFS} An instance of IPFSBlockStorage. @@ -23,11 +20,9 @@ const defaultTimeout = 30000 * @throw An instance of ipfs is required if params.ipfs is not specified. * @instance */ -const IPFSBlockStorage = async ({ ipfs, timeout, pin } = {}) => { +const IPFSBlockStorage = async ({ ipfs, pin } = {}) => { if (!ipfs) throw new Error('An instance of ipfs is required.') - timeout = timeout || defaultTimeout - /** * Puts data to an IPFS block. * @function