Skip to content

Commit

Permalink
feat(provider): consider 0.0.0.0 url as localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
petarTxFusion committed Nov 6, 2024
1 parent 59513e7 commit 563773b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1341,8 +1341,12 @@ export class Provider extends JsonRpcApiProvider(ethers.JsonRpcProvider) {

const isLocalNetwork =
typeof url === 'string'
? url.includes('localhost') || url.includes('127.0.0.1')
: url.url.includes('localhost') || url.url.includes('127.0.0.1');
? url.includes('localhost') ||
url.includes('127.0.0.1') ||
url.includes('0.0.0.0')
: url.url.includes('localhost') ||
url.url.includes('127.0.0.1') ||
url.url.includes('0.0.0.0');

const optionsWithDisabledCache = isLocalNetwork
? {...options, cacheTimeout: -1}
Expand Down

0 comments on commit 563773b

Please sign in to comment.