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

@@ -208,8 +208,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="38"
class="link-to-prism">src/app/_services/token.service.ts:38</a></div>
<div class="io-line">Defined in <a href="" data-line="37"
class="link-to-prism">src/app/_services/token.service.ts:37</a></div>
</td>
</tr>
@@ -278,8 +278,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="34"
class="link-to-prism">src/app/_services/token.service.ts:34</a></div>
<div class="io-line">Defined in <a href="" data-line="33"
class="link-to-prism">src/app/_services/token.service.ts:33</a></div>
</td>
</tr>
@@ -350,8 +350,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="29"
class="link-to-prism">src/app/_services/token.service.ts:29</a></div>
<div class="io-line">Defined in <a href="" data-line="28"
class="link-to-prism">src/app/_services/token.service.ts:28</a></div>
</td>
</tr>
@@ -466,36 +466,35 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { EventEmitter, Injectable } from &#x27;@angular/core&#x27;;
import {environment} from &#x27;@src/environments/environment&#x27;;
import {BehaviorSubject, Observable} from &#x27;rxjs&#x27;;
import {CICRegistry} from &#x27;cic-client&#x27;;
import {TokenRegistry} from &#x27;@app/_eth&#x27;;
import {HttpClient} from &#x27;@angular/common/http&#x27;;
import {RegistryService} from &#x27;@app/_services/registry.service&#x27;;
import { environment } from &#x27;@src/environments/environment&#x27;;
import { BehaviorSubject, Observable } from &#x27;rxjs&#x27;;
import { CICRegistry } from &#x27;cic-client&#x27;;
import { TokenRegistry } from &#x27;@app/_eth&#x27;;
import { HttpClient } from &#x27;@angular/common/http&#x27;;
import { RegistryService } from &#x27;@app/_services/registry.service&#x27;;
@Injectable({
providedIn: &#x27;root&#x27;
providedIn: &#x27;root&#x27;,
})
export class TokenService {
registry: CICRegistry;
tokenRegistry: TokenRegistry;
LoadEvent: EventEmitter&lt;number&gt; &#x3D; new EventEmitter&lt;number&gt;();
constructor(
private httpClient: HttpClient,
private registryService: RegistryService,
) {
constructor(private httpClient: HttpClient, private registryService: RegistryService) {
this.registry &#x3D; registryService.getRegistry();
this.registry.load();
this.registry.onload &#x3D; async (address: string): Promise&lt;void&gt; &#x3D;&gt; {
this.tokenRegistry &#x3D; new TokenRegistry(await this.registry.getContractAddressByName(&#x27;TokenRegistry&#x27;));
this.tokenRegistry &#x3D; new TokenRegistry(
await this.registry.getContractAddressByName(&#x27;TokenRegistry&#x27;)
);
this.LoadEvent.next(Date.now());
};
}
async getTokens(): Promise&lt;Array&lt;Promise&lt;string&gt;&gt;&gt; {
const count: number &#x3D; await this.tokenRegistry.totalTokens();
return Array.from({length: count}, async (v, i) &#x3D;&gt; await this.tokenRegistry.entry(i));
return Array.from({ length: count }, async (v, i) &#x3D;&gt; await this.tokenRegistry.entry(i));
}
getTokenBySymbol(symbol: string): Observable&lt;any&gt; {