Skip to content

Commit

Permalink
Use "this" in static methods
Browse files Browse the repository at this point in the history
  • Loading branch information
lcswillems committed Nov 9, 2024
1 parent 65577ff commit 6ede041
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion xsuite/src/world/fsworld.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class FSWorld extends World {
explorerUrl?: string;
} & ProxyParams = {}): Promise<FSWorld> {
const { server, proxyUrl } = await startProxy(proxyParams);
return FSWorld.new({ proxyUrl, gasPrice, explorerUrl, server });
return this.new({ proxyUrl, gasPrice, explorerUrl, server });
}

async restartProxy(proxyParams: ProxyParams = {}) {
Expand Down
2 changes: 1 addition & 1 deletion xsuite/src/world/lsworld.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class LSWorld extends World {
});
});

return LSWorld.new({ proxyUrl, gasPrice, explorerUrl, server });
return this.new({ proxyUrl, gasPrice, explorerUrl, server });
}

newWallet(addressOrSigner: AddressLike | Signer): LSWallet {
Expand Down
6 changes: 3 additions & 3 deletions xsuite/src/world/world.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ export class World {
}

static newDevnet(options: WorldNewRealnetOptions = {}) {
return World.new({ chainId: devnetChainId, ...options });
return this.new({ chainId: devnetChainId, ...options });
}

static newTestnet(options: WorldNewRealnetOptions = {}) {
return World.new({ chainId: testnetChainId, ...options });
return this.new({ chainId: testnetChainId, ...options });
}

static newMainnet(options: WorldNewRealnetOptions = {}) {
return World.new({ chainId: mainnetChainId, ...options });
return this.new({ chainId: mainnetChainId, ...options });
}

newWallet(signer: Signer) {
Expand Down

0 comments on commit 6ede041

Please sign in to comment.