Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
10 changes: 1 addition & 9 deletions examples/enskit-react-example/src/AccountView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ const AccountDomainsQuery = graphql(`
domains(first: $first, after: $after) {
totalCount
edges {
# # TODO: after upgrading v2-sepolia to have materialized canonical name, update this to:
# node { __typename id canonical { name { interpreted } } }
node { __typename id name }
node { __typename id name }
}
pageInfo { hasNextPage endCursor }
}
Expand Down Expand Up @@ -62,12 +60,6 @@ function RenderAccount({ address }: { address: NormalizedAddress }) {
<ul>
{domains.edges.map((edge) => (
<li key={edge.node.id}>
{/*
TODO: after upgrading v2-sepolia to have materialized canonical name, update this to:
{edge.node.canonical ? (
<Link to={`/domain/${edge.node.canonical.name.interpreted}`}>
{beautifyInterpretedName(edge.node.canonical.name.interpreted)}
*/}
{edge.node.name ? (
<Link to={`/domain/${edge.node.name}`}>
{beautifyInterpretedName(edge.node.name)}
Expand Down
22 changes: 0 additions & 22 deletions examples/enskit-react-example/src/DomainView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ const DomainFragment = graphql(`
fragment DomainFragment on Domain {
__typename
id
# # TODO: after upgrading v2-sepolia to have materialized canonical name, update this to:
# canonical { name { interpreted } }
name
owner { id address }
}
Expand All @@ -20,8 +18,6 @@ const DomainByNameQuery = graphql(
query DomainByName($name: InterpretedName!, $first: Int!, $after: String) {
domain(by: { name: $name }) {
...DomainFragment
# # TODO: after upgrading v2-sepolia to have materialized canonical name, update this to:
# parent { canonical { name { interpreted } } }
parent { name }
subdomains(first: $first, after: $after) {
edges {
Expand Down Expand Up @@ -49,11 +45,6 @@ function SubdomainLink({ data }: { data: FragmentOf<typeof DomainFragment> }) {
<li>
{domain.name ? (
<Link to={`/domain/${domain.name}`}>{beautifyInterpretedName(domain.name)}</Link>
// TODO: after upgrading v2-sepolia to have materialized canonical name, update this to:
// {domain.canonical ? (
// <Link to={`/domain/${domain.canonical.name.interpreted}`}>
// {beautifyInterpretedName(domain.canonical.name.interpreted)}
// </Link>
) : (
<em>non-canonical domain</em>
)}{" "}
Expand Down Expand Up @@ -88,10 +79,6 @@ function RenderDomain({ name }: { name: InterpretedName }) {

return (
<div>
{/*
TODO: after upgrading v2-sepolia to have materialized canonical name, update this to:
<h2>{beautifyInterpretedName(domain.canonical?.name.interpreted ?? name)}</h2>
*/}
<h2>{beautifyInterpretedName(domain.name ?? name)}</h2>
<p>
Owner:{" "}
Expand All @@ -105,14 +92,6 @@ function RenderDomain({ name }: { name: InterpretedName }) {
</p>
<p>Version: {domain.__typename}</p>

{/*
TODO: after upgrading v2-sepolia to have materialized canonical name, update this to:
{data.domain.parent?.canonical && (
<Link to={`/domain/${data.domain.parent.canonical.name.interpreted}`}>
← {beautifyInterpretedName(data.domain.parent.canonical.name.interpreted)}
</Link>
)}
*/}
{data.domain.parent?.name && (
<Link to={`/domain/${data.domain.parent.name}`}>
← {beautifyInterpretedName(data.domain.parent.name)}
Expand Down Expand Up @@ -155,7 +134,6 @@ export function DomainView() {
const params = useParams();

// if a user accesses '/domain' directly, redirect to '/domain/eth'
// TODO: render the set of tlds
if (params.name === undefined || params.name === "") return <Navigate to="/domain/eth" replace />;

// here we ensure that the provided /domain/:name parameter is an InterpretedName
Expand Down
7 changes: 0 additions & 7 deletions examples/enskit-react-example/src/SearchView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ const DomainsByNameQuery = graphql(`
query DomainsByName($name: String!, $first: Int!, $after: String) {
domains(where: { name: $name }, first: $first, after: $after) {
edges {
# # TODO: after upgrading v2-sepolia to have materialized canonical name, update this to:
# node { __typename id canonical { name { interpreted } } }
node { __typename id name }
}
pageInfo {
Expand Down Expand Up @@ -96,11 +94,6 @@ export function SearchView() {
({edge.node.__typename === "ENSv1Domain" ? "v1" : "v2"}){" "}
<Link to={`/domain/${edge.node.name}`}>
{beautifyInterpretedName(edge.node.name)}
{/*
TODO: after upgrading v2-sepolia to have materialized canonical name, update this to:
<Link to={`/domain/${edge.node.canonical.name.interpreted}`}>
{beautifyInterpretedName(edge.node.canonical.name.interpreted)}
*/}
</Link>
</li>
);
Expand Down
6 changes: 0 additions & 6 deletions examples/enssdk-example/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ const client = createEnsNodeClient({ url: ENSNODE_URL }).extend(omnigraph);
const DomainFragment = graphql(`
fragment DomainFragment on Domain {
__typename
# # TODO: after upgrading v2-sepolia to have materialized canonical name, update this to:
# canonical { name { interpreted } }
name
owner { address }
}
Expand All @@ -38,10 +36,6 @@ const HelloWorldQuery = graphql(
function formatDomain(data: FragmentOf<typeof DomainFragment>): string {
// type-safe access to fragment data!
const domain = readFragment(DomainFragment, data);
// TODO: after upgrading v2-sepolia to have materialized canonical name, update this to:
// const name = domain.canonical
// ? beautifyInterpretedName(domain.canonical.name.interpreted)
// : "<unnamed>";
const name = domain.name ? beautifyInterpretedName(domain.name) : "<unnamed>";
const owner = domain.owner?.address ?? "0x0 (means reserved for ENSv2)";
return `${name} (${domain.__typename}) — Owner ${owner}`;
Expand Down
8 changes: 0 additions & 8 deletions examples/omnigraph-graphql-example/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@ const HELLO_WORLD_QUERY = /* GraphQL */ `
query HelloWorld($name: InterpretedName!) {
domain(by: { name: $name }) {
__typename
# # TODO: after upgrading v2-sepolia to have materialized canonical name, update this to:
# canonical { name { interpreted } }
name
owner { address }
subdomains(first: 20) {
totalCount
# # TODO: after upgrading v2-sepolia to have materialized canonical name, update this to:
# edges { node { __typename canonical { name { interpreted } } owner { address } } }
edges { node { __typename name owner { address } } }
}
}
Expand All @@ -25,8 +21,6 @@ const HELLO_WORLD_QUERY = /* GraphQL */ `

interface Domain {
__typename: "ENSv1Domain" | "ENSv2Domain";
// TODO: after upgrading v2-sepolia to have materialized canonical name, update this to:
// canonical: { name: { interpreted: string } } | null;
name: string;
owner: { address: string } | null;
}
Expand All @@ -46,8 +40,6 @@ interface QueryResult {
}

function formatDomain(domain: Domain): string {
// TODO: after upgrading v2-sepolia to have materialized canonical name, update this to:
// const name = domain.canonical?.name.interpreted ?? "<unnamed>";
const name = domain.name ?? "<unnamed>";
const owner = domain.owner?.address ?? "0x0";
return `${name} (${domain.__typename}) — Owner ${owner}`;
Expand Down
Loading