Skip to content

Commit

Permalink
Merge pull request #147 from algorandfoundation/docs/bugfixes-keyreg-…
Browse files Browse the repository at this point in the history
…offline-tool

docs: fix NFD searching with uppercase, fix clearing tips
  • Loading branch information
tasosbit authored Feb 12, 2025
2 parents fdd784b + 915babb commit 8207d98
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/src/pages/offline.astro
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ export const lang = "en";
elem.disabled = false;
elem.focus();
}
} else {
hideResults();
}
};
const sleep = async (ms: number) =>
Expand All @@ -179,10 +177,11 @@ export const lang = "en";
};
async function lookupNFD(name: string) {
const resp = await fetch(
`https://api.nf.domains/nfd/${name}?view=tiny`
`https://api.nf.domains/nfd/${name.toLowerCase()}?view=tiny`
);
if (resp.status === 404) throw new Error("NFD Not found");
const data = await resp.json();
if (resp.status >= 400) throw new Error(data?.message ?? `HTTP Error ${resp.status}`);
const { caAlgo = [], depositAccount, unverifiedCaAlgo = [] } = data;
const res: Record<string, string> = {};
if (depositAccount) res[depositAccount] = "Deposit";
Expand Down

0 comments on commit 8207d98

Please sign in to comment.