diff --git a/packages/js/dist/server/server.js b/packages/js/dist/server/server.js index c09a2a6c..5bf7561e 100644 --- a/packages/js/dist/server/server.js +++ b/packages/js/dist/server/server.js @@ -127,7 +127,7 @@ class SandboxServer { return this.config.port; } get rpcAddr() { - return `http://localhost:${this.port}`; + return `http://127.0.0.1:${this.port}`; } async start() { (0, internal_utils_1.debug)('Lifecycle.SandboxServer.start()'); diff --git a/packages/js/dist/utils.js b/packages/js/dist/utils.js index 1a468567..d0a51868 100644 --- a/packages/js/dist/utils.js +++ b/packages/js/dist/utils.js @@ -102,7 +102,7 @@ function urlConfigFromNetwork(network) { case 'sandbox': return { network: 'sandbox', - rpcAddr: 'http://localhost', + rpcAddr: 'http://127.0.0.1', }; case 'custom': return { diff --git a/packages/js/dist/worker.js b/packages/js/dist/worker.js index 6ca8cfa3..a367c116 100644 --- a/packages/js/dist/worker.js +++ b/packages/js/dist/worker.js @@ -178,7 +178,7 @@ class SandboxWorker extends Worker { port, rm: false, refDir: null, - rpcAddr: `http://localhost:${port}`, + rpcAddr: `http://127.0.0.1:${port}`, }; } get provider() { @@ -201,7 +201,7 @@ class SandboxWorker extends Worker { }; } get rpcAddr() { - return `http://localhost:${this.config.port}`; + return `http://127.0.0.1:${this.config.port}`; } } exports.SandboxWorker = SandboxWorker; diff --git a/packages/js/src/server/server.ts b/packages/js/src/server/server.ts index e8cf34e1..b2c4f637 100644 --- a/packages/js/src/server/server.ts +++ b/packages/js/src/server/server.ts @@ -131,7 +131,7 @@ export class SandboxServer { } get rpcAddr(): string { - return `http://localhost:${this.port}`; + return `http://127.0.0.1:${this.port}`; } async start(): Promise { diff --git a/packages/js/src/utils.ts b/packages/js/src/utils.ts index 0949c251..e4579a6d 100644 --- a/packages/js/src/utils.ts +++ b/packages/js/src/utils.ts @@ -81,7 +81,7 @@ export function urlConfigFromNetwork(network: string | {network: string; rpcAddr case 'sandbox': return { network: 'sandbox', - rpcAddr: 'http://localhost', + rpcAddr: 'http://127.0.0.1', }; case 'custom': diff --git a/packages/js/src/worker.ts b/packages/js/src/worker.ts index 579cffd6..6f20b66e 100644 --- a/packages/js/src/worker.ts +++ b/packages/js/src/worker.ts @@ -200,7 +200,7 @@ export class SandboxWorker extends Worker { port, rm: false, refDir: null, - rpcAddr: `http://localhost:${port}`, + rpcAddr: `http://127.0.0.1:${port}`, }; } @@ -226,6 +226,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}`; } }