Skip to content

Commit

Permalink
Temporarily disable UNS
Browse files Browse the repository at this point in the history
UNS was compromised in the SquareSpace domain hack triggered by the
Google Domains shutdown. They've turned off services but DNS hijacking
means we will avoid trusting until things are back to normal, at which
point an updated API key will be issued and UNS will be re-enabled with
the updated key.
  • Loading branch information
Shadowfiend committed Jul 15, 2024
1 parent 25e2a72 commit cfb9d1e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
25 changes: 17 additions & 8 deletions background/services/name/resolvers/uns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ const UNS_SUPPORTED_NETWORKS = [ETHEREUM, POLYGON]
/**
* Lookup a UNS domain name and fetch the owners address
*/
// FIXME UNS issues
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const lookupUNSDomain = async (domain: string) => {
const response = await fetchJson({
url: `https://resolve.unstoppabledomains.com/domains/${domain}`,
Expand Down Expand Up @@ -149,10 +151,13 @@ export default function unsResolver(): NameResolver<"UNS"> {
},

async lookUpAddressForName({
name,
network,
name: _,
network: __,
}: NameOnNetwork): Promise<AddressOnNetwork | undefined> {
// We try to resolve the name using unstoppable domains resolution
// FIXME Restore body once UNS is back in action and we have a new API key.
return undefined

/* We try to resolve the name using unstoppable domains resolution
const address = (await lookupUNSDomain(name))?.meta?.owner
if (address === undefined || address === null) {
Expand All @@ -162,11 +167,13 @@ export default function unsResolver(): NameResolver<"UNS"> {
return {
address,
network,
}
} */
},
async lookUpAvatar(
addressOrNameOnNetwork: AddressOnNetwork | NameOnNetwork,
) {
async lookUpAvatar(_: AddressOnNetwork | NameOnNetwork) {
// FIXME Restore body once UNS is back in action and we have a new API key.
return undefined

/*
const { network } = addressOrNameOnNetwork
const { address } =
"address" in addressOrNameOnNetwork
Expand Down Expand Up @@ -200,12 +207,14 @@ export default function unsResolver(): NameResolver<"UNS"> {
return {
uri: avatarUrn,
network,
}
} */
},
async lookUpNameForAddress({
address,
network,
}: AddressOnNetwork): Promise<NameOnNetwork | undefined> {
return Promise.resolve(undefined)

// Get all the records associated with the particular ETH address
const data = (await reverseLookupAddress(address))?.data
// Since for a given address you can have multiple UNS records, we just pick the first one
Expand Down
7 changes: 6 additions & 1 deletion ui/pages/Send.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,12 @@ export default function Send(): ReactElement {
</button>
)}
{addressErrorMessage !== undefined && (
<p className="error">{addressErrorMessage}</p>
<p
className="error"
title="Note: UNS temporarily disabled for security reasons."
>
⚠️ {addressErrorMessage}
</p>
)}
</div>
<div className="send_footer standard_width_padded">
Expand Down

0 comments on commit cfb9d1e

Please sign in to comment.