Skip to content

Commit

Permalink
be less bad
Browse files Browse the repository at this point in the history
  • Loading branch information
stjet authored Nov 14, 2024
1 parent 4be4f7f commit 991cf0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/routes/explorer/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
if (filterType === "address") {
if (searchQuery.includes(".")) {
const [name, tld] = searchQuery.split(".");
searchQuery = (await (new window.bns.Resolver(new window.bns.banani.RPC("https://kaliumapi.appditto.com/api"), TLD_MAPPING)).resolve(name, tld)).resolved_address;
if (TLD_MAPPING[tld]) {
searchQuery = (await (new window.bns.Resolver(new window.bns.banani.RPC("https://kaliumapi.appditto.com/api"), TLD_MAPPING)).resolve(name, tld)).resolved_address;
}
}
if (validateBananoAddress(searchQuery)) {
return goto(`/explorer/addresses?address=${searchQuery}`);
Expand Down

0 comments on commit 991cf0c

Please sign in to comment.