Format docs using linter and prettier.
This commit is contained in:
@@ -682,7 +682,7 @@ Returns "true" for available and "false" otherwise.</p>
|
||||
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import Web3 from 'web3';
|
||||
|
||||
// Application imports
|
||||
import {environment} from '@src/environments/environment';
|
||||
import { environment } from '@src/environments/environment';
|
||||
|
||||
/** Fetch the account registry contract's ABI. */
|
||||
const abi: Array<any> = require('@src/assets/js/block-sync/data/AccountRegistry.json');
|
||||
@@ -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<boolean> {
|
||||
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<boolean> {
|
||||
return await this.contract.methods.accountIndex(address).call() !== 0;
|
||||
return (await this.contract.methods.accountIndex(address).call()) !== 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user