Skip to content

Commit

Permalink
bug: force ipv4 instead of localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
no2chem committed Mar 24, 2023
1 parent fcb029b commit 3e0ddc6
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/js/dist/server/server.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/js/dist/utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/js/dist/worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/js/src/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class SandboxServer {
}

get rpcAddr(): string {
return `http://localhost:${this.port}`;
return `http://127.0.0.1:${this.port}`;
}

async start(): Promise<SandboxServer> {
Expand Down
2 changes: 1 addition & 1 deletion packages/js/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function urlConfigFromNetwork(network: string | {network: string}): Clien
case 'sandbox':
return {
network: 'sandbox',
rpcAddr: 'http://localhost',
rpcAddr: 'http://127.0.0.1',
};

case 'testnet':
Expand Down
4 changes: 2 additions & 2 deletions packages/js/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class SandboxWorker extends Worker {
port,
rm: false,
refDir: null,
rpcAddr: `http://localhost:${port}`,
rpcAddr: `http://127.0.0.1:${port}`,
};
}

Expand All @@ -138,6 +138,6 @@ export class SandboxWorker extends Worker {
}

private get rpcAddr(): string {
return `http://localhost:${this.config.port}`;
return `http://127.0.0.1:${this.config.port}`;
}
}

0 comments on commit 3e0ddc6

Please sign in to comment.