Skip to content

Commit

Permalink
Merge pull request #1305 from polywrap/ipfs-plugin-fallbacks-check
Browse files Browse the repository at this point in the history
Fix: check for fallback providers in IPFS plugin
  • Loading branch information
dOrgJelli authored Oct 7, 2022
2 parents 38bc53a + 1a31808 commit 2ced3b7
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 2ced3b7

Please sign in to comment.