Skip to content

Commit e07d1e3

Browse files
authored
Stop using hostname prefix in getApiName (#68)
Should close #67.
1 parent 3e783f2 commit e07d1e3

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

packages/vscode-host/src/deth/commands/ethViewerCommands.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,10 @@ export const ethViewerCommands = {
1818
},
1919
getApiName: (): string | undefined => {
2020
const { hostname, search } = window.location;
21-
let res: string | undefined = undefined;
2221

2322
const searchParam = new URLSearchParams(search).get("explorer");
24-
if (searchParam) res = searchParam;
2523

26-
// @todo this can be deprecated after we deploy and configure iframe entrypoints
27-
if (hostname.endsWith(".deth.net")) res = hostname.slice(0, -9);
28-
29-
return res && res.replace(/^www\./, "");
24+
return searchParam?.replace(/^www\./, "");
3025
},
3126
openRepoOnGithub: () => {
3227
window.open("https://github.com/dethcrypto/ethereum-code-viewer", "_blank");

0 commit comments

Comments
 (0)