Skip to content

Commit

Permalink
fixed fallback providers check in ipfs plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
krisbitney committed Oct 7, 2022
1 parent 8b807a7 commit 1a31808
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/js/plugins/ipfs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,14 @@ export class IpfsPlugin extends Module<NoConfig> {
): Promise<TReturn> {
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
);
}
Expand Down

0 comments on commit 1a31808

Please sign in to comment.