Skip to content

Commit 58fd5bc

Browse files
author
ci-bot
committed
fix solidity scan call in desktop
1 parent 3f8bd99 commit 58fd5bc

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

libs/endpoints-helper/src/index.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,16 @@ const resolvedUrls: EndpointUrls = prefix
6666
) as EndpointUrls
6767
: defaultUrls;
6868

69-
resolvedUrls.solidityScanWebSocket = resolvedUrls.solidityScan.replace(
70-
'http://',
71-
'ws://'
72-
);
69+
if (resolvedUrls.solidityScan.startsWith('https://')) {
70+
resolvedUrls.solidityScanWebSocket = resolvedUrls.solidityScan.replace(
71+
'https://',
72+
'wss://'
73+
);
74+
} else if (resolvedUrls.solidityScan.startsWith('http://')) {
75+
resolvedUrls.solidityScanWebSocket = resolvedUrls.solidityScan.replace(
76+
'http://',
77+
'ws://'
78+
);
79+
}
7380

7481
export const endpointUrls = resolvedUrls;

0 commit comments

Comments
 (0)