Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix: remove walletconnect domain validation #2407

Merged
merged 7 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions packages/core/src/controllers/EnsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ export const EnsController = {
throw new Error('Address or auth connector not found')
}

if (!this.isAllowedToRegisterName()) {
throw new Error('Not allowed to register name')
}

state.loading = true

try {
Expand Down Expand Up @@ -163,12 +159,5 @@ export const EnsController = {
const ensError = error as BlockchainApiEnsError

return ensError?.reasons?.[0]?.description || defaultError
},
isAllowedToRegisterName() {
const emailConnector = ConnectorController.getAuthConnector()
const email = emailConnector?.provider.getEmail() || ''
const domain = email.split('@')?.[1]

return domain && ConstantsUtil.WC_NAMES_ALLOWED_DOMAINS.includes(domain)
ignaciosantise marked this conversation as resolved.
Show resolved Hide resolved
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
StorageUtil,
ConnectorController,
SendController,
EnsController,
ConstantsUtil
} from '@web3modal/core'
import { UiHelperUtil, customElement } from '@web3modal/ui'
Expand Down Expand Up @@ -154,8 +153,7 @@ export class W3mAccountSettingsView extends LitElement {
private chooseNameButtonTemplate() {
const type = StorageUtil.getConnectedConnector()
const authConnector = ConnectorController.getAuthConnector()
const isAllowed = EnsController.isAllowedToRegisterName()
if (!authConnector || type !== 'AUTH' || this.profileName || !isAllowed) {
if (!authConnector || type !== 'AUTH' || this.profileName) {
return null
}

Expand Down