Skip to content

Commit

Permalink
add arthera explorer redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
hichri-louay committed Apr 23, 2024
1 parent bc12c6e commit 350f04d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h6 class="trx-hash-title" *ngIf="type !== 'apply'">
{{ 'Your transaction hash: ' | translate }}
</h6>
<div class="d-flex align-items-baseline justify-content-center">
<a [href]="type !== 'apply' ? networkWallet : 'farm-posts'" target="_blank">
<a [href]="redirect(networkWallet)" target="_blank">
<!-- <p class="trx-hash-text text-bold">{{ transactionHash }}</p> -->
<div class="d-flex justify-content-center">
<span class="span-wallet flex-start">{{ transactionHash }}</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, Input, SimpleChanges } from '@angular/core';
import { Clipboard } from '@angular/cdk/clipboard';
import {
artheraScan,
bscan,
bttscan,
etherscan,
Expand Down Expand Up @@ -64,4 +65,22 @@ export class CopyTransactionHashComponent {
this.isTransactionHashCopied = false;
}, 2000);
}

redirect(network:string) {
if (network === 'BEP20') {
this.urlSmartContrat = bscan + this.transactionHash;
} else if (network === 'ERC20') {
this.urlSmartContrat = etherscan + this.transactionHash;
} else if (network === 'POLYGON') {
this.urlSmartContrat = polygonscan + this.transactionHash;
} else if (network === 'BTTC') {
this.urlSmartContrat = bttscan + this.transactionHash;
} else if (network === 'TRON') {
this.urlSmartContrat = tronScan + this.transactionHash;
} else if(network === 'ARTHERA') {
this.urlSmartContrat = artheraScan + this.transactionHash;
}
this.windowRefService.nativeWindow.open(this.urlSmartContrat, '_blank');

}
}

0 comments on commit 350f04d

Please sign in to comment.