Format docs using linter and prettier.

This commit is contained in:
Spencer Ofwiti
2021-05-11 20:51:48 +03:00
parent 5228842e61
commit 208c448984
309 changed files with 11327 additions and 3307 deletions

View File

@@ -682,7 +682,7 @@ Returns &quot;true&quot; for available and &quot;false&quot; otherwise.</p>
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import Web3 from &#x27;web3&#x27;;
// Application imports
import {environment} from &#x27;@src/environments/environment&#x27;;
import { environment } from &#x27;@src/environments/environment&#x27;;
/** Fetch the account registry contract&#x27;s ABI. */
const abi: Array&lt;any&gt; &#x3D; require(&#x27;@src/assets/js/block-sync/data/AccountRegistry.json&#x27;);
@@ -735,8 +735,8 @@ export class AccountIndex {
* @returns true - If registration is successful or account had already been registered.
*/
public async addToAccountRegistry(address: string): Promise&lt;boolean&gt; {
if (!await this.haveAccount(address)) {
return await this.contract.methods.add(address).send({from: this.signerAddress});
if (!(await this.haveAccount(address))) {
return await this.contract.methods.add(address).send({ from: this.signerAddress });
}
return true;
}
@@ -756,7 +756,7 @@ export class AccountIndex {
* @returns true - If the address has been registered in the accounts registry.
*/
public async haveAccount(address: string): Promise&lt;boolean&gt; {
return await this.contract.methods.accountIndex(address).call() !&#x3D;&#x3D; 0;
return (await this.contract.methods.accountIndex(address).call()) !&#x3D;&#x3D; 0;
}
/**