Skip to content

Commit

Permalink
Merge branch 'develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterter committed Oct 17, 2022
2 parents edc7c60 + df6082e commit 8e6b588
Show file tree
Hide file tree
Showing 10 changed files with 6,688 additions and 6,629 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ The order in which the networks are shown in the UI is also based on this config
{
"polkadot": {
"substrateRpcUrlArray": ["wss://rpc.polkadot.io"],
"polkascanWsUrlArray": ["wss://mycustomnode.io/polkadot"]
"explorerWsUrlArray": ["wss://mycustomnode.io/polkadot"]
},
"kusama": {
"substrateRpcUrlArray": ["wss://kusama-rpc.polkadot.io", "wss://other-kusama-node.io"],
"polkascanWsUrlArray": ["wss://mycustomnode.io/kusama"]
"explorerWsUrlArray": ["wss://mycustomnode.io/kusama"]
}
}
```
Expand Down
13,207 changes: 6,618 additions & 6,589 deletions package-lock.json

Large diffs are not rendered by default.

58 changes: 29 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~13.3.2",
"@angular/cdk": "~13.3.2",
"@angular/common": "~13.3.2",
"@angular/compiler": "~13.3.2",
"@angular/core": "~13.3.2",
"@angular/forms": "~13.3.2",
"@angular/material": "~13.3.2",
"@angular/platform-browser": "~13.3.2",
"@angular/platform-browser-dynamic": "~13.3.2",
"@angular/router": "~13.3.2",
"@angular/animations": "~14.1.2",
"@angular/cdk": "~14.1.2",
"@angular/common": "~14.1.2",
"@angular/compiler": "~14.1.2",
"@angular/core": "~14.1.2",
"@angular/forms": "~14.1.2",
"@angular/material": "~14.1.2",
"@angular/platform-browser": "~14.1.2",
"@angular/platform-browser-dynamic": "~14.1.2",
"@angular/router": "~14.1.2",
"@polkadapt/coingecko": "file:polkadapt/dist/coingecko",
"@polkadapt/core": "file:polkadapt/dist/core",
"@polkadapt/polkascan-explorer": "file:polkadapt/dist/polkascan-explorer",
"@polkadapt/substrate-rpc": "file:polkadapt/dist/substrate-rpc",
"@polkadot/api": "8.3.2",
"@polkadot/ui-shared": "2.0.1",
"@polkadot/api": "9.3.3",
"@polkadot/ui-shared": "2.9.8",
"buffer": "^6.0.3",
"crypto": "npm:crypto-browserify@^3.12.0",
"ethereum-blockies-base64": "^1.0.2",
Expand All @@ -40,26 +40,26 @@
"zone.js": "~0.11.5"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.3.2",
"@angular-eslint/builder": "13.2.0",
"@angular-eslint/eslint-plugin": "13.2.0",
"@angular-eslint/eslint-plugin-template": "13.2.0",
"@angular-eslint/schematics": "13.2.0",
"@angular-eslint/template-parser": "13.2.0",
"@angular/cli": "~13.3.2",
"@angular/compiler-cli": "~13.3.2",
"@polkadot/types": "8.3.2",
"@types/jasmine": "~3.10.3",
"@angular-devkit/build-angular": "~14.1.2",
"@angular-eslint/builder": "14.0.2",
"@angular-eslint/eslint-plugin": "14.0.2",
"@angular-eslint/eslint-plugin-template": "14.0.2",
"@angular-eslint/schematics": "14.0.2",
"@angular-eslint/template-parser": "14.0.2",
"@angular/cli": "~14.1.2",
"@angular/compiler-cli": "~14.1.2",
"@polkadot/types": "9.3.3",
"@types/jasmine": "~4.0.3",
"@types/node": "^12.11.1",
"@typescript-eslint/eslint-plugin": "5.18.0",
"@typescript-eslint/parser": "5.18.0",
"eslint": "^8.12.0",
"jasmine-core": "~4.0.1",
"karma": "~6.3.17",
"@typescript-eslint/eslint-plugin": "5.30.0",
"@typescript-eslint/parser": "5.30.0",
"eslint": "^8.22.0",
"jasmine-core": "~4.3.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~4.0.1",
"karma-jasmine": "~5.0.0",
"karma-jasmine-html-reporter": "^1.7.0",
"typescript": "~4.5.5"
"typescript": "~4.7.4"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ export class PsConnectionDialogComponent implements OnInit, OnDestroy {
}

async submitSubstrateRpcUrl(): Promise<void> {
await this.pa.setSubstrateRpcUrl(this.substrateRpcUrlForm.value.url);
await this.pa.setSubstrateRpcUrl(this.substrateRpcUrlForm.value.url!);
}

async submitExplorerWsUrl(): Promise<void> {
await this.pa.setExplorerWsUrl(this.explorerWsUrlForm.value.url);
await this.pa.setExplorerWsUrl(this.explorerWsUrlForm.value.url!);
}
}
2 changes: 2 additions & 0 deletions src/app/components/ps-top-bar/ps-top-bar.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ ps-top-bar {
vertical-align: middle;
height: 1rem;
width: 1rem;
position: static;
border: none;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,28 @@ <h1>Account</h1>
</div>
</div>

<ng-container *ngIf="(fetchAccountInfoStatus | async) as status">
<p *ngIf="status === 'loading'">Loading...</p>
<p *ngIf="status === 'error'">Could not fetch runtime.</p>
</ng-container>

<ng-container *ngIf="(polkascanAccountInfo | async) as pai">
<h3>Tags</h3>
<table class="detail-table">
<tr *ngIf="pai.tagType">
<td class="detail-table--label-cell">Type</td>
<td>
<i class="fas fa-exclamation-triangle" *ngIf="pai.riskLevel && pai.riskLevel > 0" title="{{pai.riskLevelVerbose}}"></i>
{{ pai.tagType }} <span *ngIf="pai.tagSubType">({{pai.tagSubType}})</span>
</td>
</tr>
<tr *ngIf="pai.tagName">
<td class="detail-table--label-cell">Name</td>
<td>{{ pai.tagName }}</td>
</tr>
</table>

</ng-container>

<ng-container *ngIf="dai.identity as idn">
<h3>Identity</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { ActivatedRoute, Router } from '@angular/router';
import { NetworkService } from '../../../../../services/network.service';
import { PolkadaptService } from '../../../../../services/polkadapt.service';
import {
catchError, distinctUntilChanged, filter, first, map, shareReplay, startWith, switchMap, takeUntil
catchError, distinctUntilChanged, filter, first, map, shareReplay, startWith, switchMap, takeUntil, tap
} from 'rxjs/operators';
import { BehaviorSubject, combineLatest, Observable, of, Subject } from 'rxjs';
import {
Expand Down Expand Up @@ -119,6 +119,9 @@ export class AccountDetailComponent implements OnInit, OnDestroy {
balanceTransfers: Observable<pst.Transfer[]>;
signedExtrinsics = new BehaviorSubject<pst.Extrinsic[]>([]);

fetchAccountInfoStatus = new BehaviorSubject<any>(null);
polkascanAccountInfo = new BehaviorSubject<pst.TaggedAccount| null>(null);

balanceTransferColumns = ['icon', 'block', 'from', 'to', 'value', 'details']
signedExtrinsicsColumns = ['icon', 'extrinsicID', 'block', 'pallet', 'call', 'details'];

Expand Down Expand Up @@ -205,6 +208,7 @@ export class AccountDetailComponent implements OnInit, OnDestroy {
this.fetchAndSubscribeFromTransfers(accountIdHex);
this.fetchAndSubscribeToTransfers(accountIdHex);
this.fetchAndSubscribeExtrinsics(accountIdHex);
this.fetchTaggedAccounts(accountIdHex);
} catch (e) {
}
} else {
Expand Down Expand Up @@ -485,6 +489,11 @@ export class AccountDetailComponent implements OnInit, OnDestroy {
this.unsubscribeFns.set('toBalanceTransfersUnsubscribeFn', toBalanceTransfersUnsubscribeFn);
}

fetchTaggedAccounts(accountIdHex: string): void {
this.pa.run().polkascan.state.getTaggedAccount(accountIdHex).then(
(account) => this.polkascanAccountInfo.next(account)
);
}

ngOnDestroy(): void {
this.unsubscribeFns.forEach((unsub) => unsub());
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/network/explorer/explorer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export class ExplorerComponent implements OnInit, OnDestroy {

submitSearch() {
if (this.searchForm.valid) {
const value = this.searchForm.value.search.trim();
const value = (this.searchForm.value.search)!.trim();
if (value) {
if (value.startsWith('0x')) {
// this.router.navigate(['transaction', value], {relativeTo: this.route});
Expand Down
5 changes: 1 addition & 4 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff">
<meta name="msapplication-TileColor" content="#2b5797">
<meta name="msapplication-config" content="/assets/icons/browserconfig.xml">

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Lexend:wght@400;600;700&display=swap" rel="stylesheet">
Expand All @@ -24,7 +21,7 @@
<link rel="shortcut icon" href="/assets/icons/favicon.ico">
<link rel="preconnect" href="https://fonts.gstatic.com">
<meta name="msapplication-TileColor" content="#360659">
<meta name="msapplication-config" content=/assets/favicon/browserconfig.xml">
<meta name="msapplication-config" content="/assets/icons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">

</head>
Expand Down

0 comments on commit 8e6b588

Please sign in to comment.