diff --git a/typescript/sdk/src/providers/MultiProvider.ts b/typescript/sdk/src/providers/MultiProvider.ts index 52da2b383..115f5bf9a 100644 --- a/typescript/sdk/src/providers/MultiProvider.ts +++ b/typescript/sdk/src/providers/MultiProvider.ts @@ -497,12 +497,16 @@ export class MultiProvider { */ async tryGetExplorerAddressUrl( chainNameOrId: ChainName | number, - _address?: string, + address?: string, ): Promise { const baseUrl = this.tryGetExplorerUrl(chainNameOrId); - const signer = this.tryGetSigner(chainNameOrId); - if (!baseUrl || !signer) return null; - const address = _address ?? (await signer.getAddress()); + if (!baseUrl) return null; + if (!address) { + const signer = this.tryGetSigner(chainNameOrId); + if (!signer) return null; + return `${baseUrl}/${await signer.getAddress()}`; + } + return `${baseUrl}/${address}`; }