Skip to content

Commit

Permalink
harden soulname isAvailable
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Nov 22, 2022
1 parent 153348f commit 3895174
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/contracts/masa-contracts.ts
Expand Up @@ -43,8 +43,12 @@ export class MasaContracts {
return soulNames;
}

async isAvailable(name: string): Promise<boolean> {
return this.identity.SoulNameContract.isAvailable(name);
async isAvailable(soulName: string): Promise<boolean> {
let available = false;
if (soulName && soulName.length > 0) {
available = await this.identity.SoulNameContract.isAvailable(soulName);
}
return available;
}

// purchase only identity
Expand Down

0 comments on commit 3895174

Please sign in to comment.