Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Commit

Permalink
Clarified comments regarding create and setOwner (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
javiesses authored May 18, 2020
1 parent f2db185 commit 542c4ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/subdomains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default class extends Composer implements Subdomains {
}

/**
* Creates a new subdomain under the given domain tree if not exists.
* Sets a subdomain owner. If the subdomain exists, sets the new owner, if not, creates the subdomain and sets the owner.
*
* @throws SEARCH_DOMAINS_UNDER_AVAILABLE_TLDS if the given domain is not a domain under valid TLDs - KB009
* @throws INVALID_DOMAIN if the given domain is empty, is not alphanumeric or if has uppercase characters - KB010
Expand Down Expand Up @@ -133,8 +133,8 @@ export default class extends Composer implements Subdomains {
}

/**
* Creates a new subdomain under the given domain tree and sets addr if provided
*
* Creates a new subdomain under the given domain tree if it is available, and sets its resolution if addr is provided.
* It could send one, two or three transactions based on the value of the sent parameters.
*
* @throws SEARCH_DOMAINS_UNDER_AVAILABLE_TLDS if the given domain is not a domain under valid TLDs - KB009
* @throws INVALID_DOMAIN if the given domain is empty, is not alphanumeric or if has uppercase characters - KB010
Expand Down
5 changes: 3 additions & 2 deletions src/types/subdomains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface Subdomains {
available(domain: string, label: string): Promise<boolean>;

/**
* Creates a new subdomain under the given domain tree
* Sets a subdomain owner. If the subdomain exists, sets the new owner, if not, creates the subdomain and sets the owner.
*
* @param domain - Parent .rsk domain. ie: wallet.rsk
* @param label - Subdomain to register. ie: alice
Expand All @@ -25,7 +25,8 @@ export interface Subdomains {
setOwner(domain: string, label: string, owner: string): Promise<TransactionReceipt>;

/**
* Creates a new subdomain under the given domain tree and sets addr if provided
* Creates a new subdomain under the given domain tree if it is available, and sets its resolution if addr is provided.
* It could send one, two or three transactions based on the value of the sent parameters.
*
* @param domain - Parent .rsk domain. ie: wallet.rsk
* @param label - Subdomain to register. ie: alice
Expand Down

0 comments on commit 542c4ff

Please sign in to comment.