Skip to content

Commit 389c7be

Browse files
committed
fix: address polynomial regexp usage
1 parent 3268c66 commit 389c7be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/client/src/viem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export function transactionError(
134134
request: TransactionRequest,
135135
): TransactionError {
136136
const baseUrl = chain?.blockExplorers?.default?.url;
137-
const link = baseUrl && `${baseUrl.replace(/\/+$/, '')}/tx/${txHash}`;
137+
const link = baseUrl && new URL(`/tx/${txHash}`, baseUrl).toString();
138138

139139
return TransactionError.new({ txHash, request, link });
140140
}

0 commit comments

Comments
 (0)