Skip to content

Commit

Permalink
fix No soulnames found for 'undefined' error
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Jun 8, 2023
1 parent 15fc228 commit e6a1c9a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/soul-name/list.ts
Expand Up @@ -3,6 +3,12 @@ import { SoulNameDetails } from "../interface";
import { loadSoulNameDetailsByAddress } from "./load";
import { printSoulName } from "./helpers";

/**
* list soul names
*
* @param masa
* @param address
*/
export const listSoulNames = async (
masa: Masa,
address?: string
Expand All @@ -11,10 +17,17 @@ export const listSoulNames = async (
return await loadSoulNameDetailsByAddress(masa, address);
};

/**
* list soul names and print them
*
* @param masa
* @param address
*/
export const listSoulNamesAndPrint = async (
masa: Masa,
address?: string
): Promise<SoulNameDetails[]> => {
address = address || (await masa.config.signer.getAddress());
const soulNames = await listSoulNames(masa, address);

if (soulNames.length > 0) {
Expand Down

0 comments on commit e6a1c9a

Please sign in to comment.