Merge branch 'main' into feature/tensor-sdk

This commit is contained in:
aryan
2024-12-31 02:51:29 +05:30
committed by GitHub
4 changed files with 17 additions and 10 deletions

View File

@@ -297,8 +297,7 @@ export class SolanaAgentKit {
return getOwnedDomainsForTLD(this, tld);
}
// eslint-disable-next-line @typescript-eslint/ban-types
async getAllDomainsTLDs(): Promise<String[]> {
async getAllDomainsTLDs(): Promise<string[]> {
return getAllDomainsTLDs(this);
}

View File

@@ -8,11 +8,10 @@ import { getAllTld } from "@onsol/tldparser";
*/
export async function getAllDomainsTLDs(
agent: SolanaAgentKit,
// eslint-disable-next-line @typescript-eslint/ban-types
): Promise<String[]> {
): Promise<string[]> {
try {
const tlds = await getAllTld(agent.connection);
return tlds.map((tld) => tld.tld);
return tlds.map((tld) => String(tld.tld));
} catch (error: any) {
throw new Error(`Failed to fetch TLDs: ${error.message}`);
}