Skip to content

Commit

Permalink
Revert "fix: talisman hostname check for portal url (#1117)" (#1118)
Browse files Browse the repository at this point in the history
This reverts commit 4cabbfd.
  • Loading branch information
chidg authored Oct 10, 2023
1 parent 4cabbfd commit 97f2b5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
17 changes: 4 additions & 13 deletions apps/extension/src/core/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,10 @@ const enable = async (origin: string): Promise<Injected> => {
return new TalismanInjected(messageService.sendMessage) as Injected
}

export const isTalismanHostname = (url: string | undefined) => {
if (!url) return false
try {
const hostname = new URL(url).hostname
return (
hostname === TALISMAN_WEB_APP_DOMAIN ||
(DEBUG && hostname?.endsWith(".talisman.pages.dev")) ||
(DEBUG && ["localhost", "127.0.0.1"].includes(hostname))
)
} catch (e) {
return false
}
}
export const isTalismanHostname = (hostname: string | undefined) =>
hostname === TALISMAN_WEB_APP_DOMAIN ||
(DEBUG && hostname?.endsWith(".talisman.pages.dev")) ||
(DEBUG && ["localhost", "127.0.0.1"].includes(hostname ?? ""))

function inject() {
// inject substrate wallet provider
Expand Down
1 change: 1 addition & 0 deletions apps/extension/src/ui/apps/popup/pages/Connect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export const Connect: FC<{ className?: string }> = ({ className }) => {
<button
type="button"
className="text-body-secondary hover:text-grey-300"
text-body-secondary
onClick={handleConnectAllClick}
>
{t("Connect All")}
Expand Down

0 comments on commit 97f2b5f

Please sign in to comment.