From 350f04da87dd87ba2c985a4676896ea978b6f7b7 Mon Sep 17 00:00:00 2001 From: hichri-louay Date: Tue, 23 Apr 2024 15:48:36 +0100 Subject: [PATCH] add arthera explorer redirection --- .../copy-transaction-hash.component.html | 2 +- .../copy-transaction-hash.component.ts | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/app/shared/components/copy-transaction-hash/copy-transaction-hash.component.html b/src/app/shared/components/copy-transaction-hash/copy-transaction-hash.component.html index 8b4d7637a..eaabb0cec 100755 --- a/src/app/shared/components/copy-transaction-hash/copy-transaction-hash.component.html +++ b/src/app/shared/components/copy-transaction-hash/copy-transaction-hash.component.html @@ -6,7 +6,7 @@
{{ 'Your transaction hash: ' | translate }}
- +
{{ transactionHash }} diff --git a/src/app/shared/components/copy-transaction-hash/copy-transaction-hash.component.ts b/src/app/shared/components/copy-transaction-hash/copy-transaction-hash.component.ts index 051b4a6fa..caf217f2e 100755 --- a/src/app/shared/components/copy-transaction-hash/copy-transaction-hash.component.ts +++ b/src/app/shared/components/copy-transaction-hash/copy-transaction-hash.component.ts @@ -1,6 +1,7 @@ import { Component, Input, SimpleChanges } from '@angular/core'; import { Clipboard } from '@angular/cdk/clipboard'; import { + artheraScan, bscan, bttscan, etherscan, @@ -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'); + + } }