From 1a31808c8386aea7db6c2ebbde1c9be4186f0eb1 Mon Sep 17 00:00:00 2001 From: krisbitney Date: Fri, 7 Oct 2022 10:24:16 +0500 Subject: [PATCH] fixed fallback providers check in ipfs plugin --- packages/js/plugins/ipfs/src/index.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/js/plugins/ipfs/src/index.ts b/packages/js/plugins/ipfs/src/index.ts index 5b4fe7717c..18bf9a6d82 100644 --- a/packages/js/plugins/ipfs/src/index.ts +++ b/packages/js/plugins/ipfs/src/index.ts @@ -108,13 +108,14 @@ export class IpfsPlugin extends Module { ): Promise { const defaultIpfsClient = createIpfsClient(this.env.provider); - if (!options) { - // Default behavior if no options are provided + if (!options?.fallbackProviders) { + // Default behavior if no fallback providers are provided + // Note that options.timeout is already set by getOptions return await execSimple( operation, defaultIpfsClient, this.config.provider, - 0, + options?.timeout ?? 0, func ); }