Skip to content

Commit

Permalink
Fix some routing links
Browse files Browse the repository at this point in the history
  • Loading branch information
dangershony committed Mar 1, 2022
1 parent e9c28fe commit c26854c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 10 deletions.
5 changes: 5 additions & 0 deletions src/Blockcore.Explorer/ClientApp/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ const routes: Routes = [
chain: LoadingResolverService
}
},
{
path: ':chain/explorer/contract-address/:address', component: ContractAddressComponent, resolve: {
chain: LoadingResolverService
}
},
{
path: ':chain/explorer/contract-address/:address/:filterAddress', component: ContractAddressComponent, resolve: {
chain: LoadingResolverService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ <h3><i class="fas fa-receipt"></i>&nbsp;&nbsp;Smart Contract Details</h3>
<span>Contract Type</span>
<span>{{transaction.contractCodeType}}</span>
</div>
<div>
<div *ngIf="this.filterAddress">
<span>Block</span>
<span><a [routerLink]="['../../../block', transaction.blockIndex]">{{transaction.blockIndex}}</a></span>
</div>
<div *ngIf="!this.filterAddress">
<span>Block</span>
<span><a [routerLink]="['../../block', transaction.blockIndex]">{{transaction.blockIndex}}</a></span>
</div>
Expand Down Expand Up @@ -60,11 +64,19 @@ <h3><i class="fas fa-receipt"></i>&nbsp;&nbsp;Smart Contract Details</h3>
<span>Contract Address</span>
<span>{{transaction.contractAddress}}</span>
</div>
<div>
<div *ngIf="this.filterAddress">
<span>View Smart Contract</span>
<span><a [routerLink]="['../../../','contract-transaction', transaction.transactionId]">{{transaction.transactionId | slice:0:20}}</a></span>
</div>
<div *ngIf="!this.filterAddress">
<span>View Smart Contract</span>
<span><a [routerLink]="['../../','contract-transaction', transaction.transactionId]">{{transaction.transactionId | slice:0:20}}</a></span>
</div>
<div>
<div *ngIf="this.filterAddress">
<span>Smart Contract Code</span>
<span><a [routerLink]="['../../../','contract-code', transaction.contractAddress]">View Source Code</a></span>
</div>
<div *ngIf="!this.filterAddress">
<span>Smart Contract Code</span>
<span><a [routerLink]="['../../','contract-code', transaction.contractAddress]">View Source Code</a></span>
</div>
Expand All @@ -77,6 +89,11 @@ <h3><i class="fas fa-receipt"></i>&nbsp;&nbsp;Smart Contract Details</h3>
</div>

<div class="box">

<div *ngIf="this.filterAddress">
<h4>Filter by {{this.filterAddress}}</h4>
</div>

<h3>Transactions ({{total}})</h3>

<app-progress class="centered" *ngIf="!transactions">Loading transactions...</app-progress>
Expand All @@ -86,10 +103,8 @@ <h3>Transactions ({{total}})</h3>
{{errorTransactions.errors | json}}
</div>

<div *ngIf="this.filterAddress">
<h4>Filter by ({{this.filterAddress}})</h4>
</div>




<div *ngIf="transactions">
<!-- <div class="grid-list-transactions">
Expand All @@ -104,10 +119,12 @@ <h4>Filter by ({{this.filterAddress}})</h4>
<div class="grid-list-contract-address" *ngFor="let item of transactions">


<span class="left"><a class=" number" [routerLink]="['../../','contract-transaction', item.transactionId]">{{item.transactionId | slice:0:20}}</a></span>
<span *ngIf="this.filterAddress" class="left"><a class=" number" [routerLink]="['../../../','contract-transaction', item.transactionId]">{{item.transactionId | slice:0:20}}</a></span>
<span *ngIf="!this.filterAddress" class="left"><a class=" number" [routerLink]="['../../','contract-transaction', item.transactionId]">{{item.transactionId | slice:0:20}}</a></span>
<span class="left">{{item.success | success}}</span>
<span class="left">{{item.methodName}}</span>
<span class="left"> <a class="number" [routerLink]="['../../block', item.blockIndex]">{{item.blockIndex}}</a></span>
<span *ngIf="this.filterAddress" class="left"> <a class="number" [routerLink]="['../../../block', item.blockIndex]">{{item.blockIndex}}</a></span>
<span *ngIf="!this.filterAddress" class="left"> <a class="number" [routerLink]="['../../block', item.blockIndex]">{{item.blockIndex}}</a></span>
<span class="address left" tippy tippyType="address">{{item.fromAddress}}</span>
<span class="number left">{{item.amount | amount}} {{setup.Chain.Symbol}}</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ <h3><i class="fas fa-receipt"></i>&nbsp;&nbsp;Smart Contract Transaction Details
<span>Amount</span>
<span>{{transaction.amount | amount}}</span>
</div>
<div>
<div *ngIf="transaction.newContractAddress">
<span>From Address</span>
<span><a [routerLink]="['../../contract-address', transaction.newContractAddress, transaction.fromAddress ]">{{transaction.fromAddress}}</a></span>
</div>
<div *ngIf="transaction.toAddress">
<span>From Address</span>
<span><a [routerLink]="['../../contract-address', transaction.toAddress, transaction.fromAddress ]">{{transaction.fromAddress}}</a></span>
</div>
Expand Down

0 comments on commit c26854c

Please sign in to comment.