From f90ec9cb10a7e30e232dfebad26fc10a7dab0dde Mon Sep 17 00:00:00 2001 From: skanderKhabou Date: Thu, 25 Apr 2024 18:21:31 +0100 Subject: [PATCH 1/3] wip harvest transaction redirect --- .../copy-transaction-hash.component.ts | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) 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 8f2ccc6a..56ba5ecb 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 @@ -41,6 +41,7 @@ export class CopyTransactionHashComponent { ngOnInit() {} ngOnChanges(changes: SimpleChanges) { + console.log(this.tokenStorageService.getNetwork()); if (changes) { this.tokenStorageService.removeItem('network'); this.tokenStorageService.setItem('network', this.networkWallet); @@ -54,6 +55,8 @@ export class CopyTransactionHashComponent { this.networkWallet = bttscan + this.transactionHash; } else if (this.tokenStorageService.getNetwork() === 'TRON') { this.networkWallet = tronScan + this.transactionHash; + } else if (this.tokenStorageService.getNetwork() === 'ARTHERA') { + this.networkWallet = artheraScan + this.transactionHash; } } } @@ -66,21 +69,21 @@ export class CopyTransactionHashComponent { }, 2000); } - redirect(network:string) { + redirect(network: string) { + console.log(network); if (network === 'BEP20') { this.urlSmartContrat = bscan + this.transactionHash; - } else if (network === 'ERC20') { + } else if (this.tokenStorageService.getNetwork() === 'ERC20') { this.urlSmartContrat = etherscan + this.transactionHash; - } else if (network === 'POLYGON') { + } else if (this.tokenStorageService.getNetwork() === 'POLYGON') { this.urlSmartContrat = polygonscan + this.transactionHash; - } else if (network === 'BTTC') { + } else if (this.tokenStorageService.getNetwork() === 'BTTC') { this.urlSmartContrat = bttscan + this.transactionHash; - } else if (network === 'TRON') { + } else if (this.tokenStorageService.getNetwork() === 'TRON') { this.urlSmartContrat = tronScan + this.transactionHash; - } else if(network === 'ARTHERA') { + } else if (this.tokenStorageService.getNetwork() === 'ARTHERA') { this.urlSmartContrat = artheraScan + this.transactionHash; } - - + return this.urlSmartContrat; } } From b8aeb6b5d4ce3780202c56835d2ce88642696d9d Mon Sep 17 00:00:00 2001 From: skanderKhabou Date: Fri, 26 Apr 2024 17:04:37 +0100 Subject: [PATCH 2/3] fix redirection with all networks include arthera --- .../copy-transaction-hash/copy-transaction-hash.component.ts | 2 -- 1 file changed, 2 deletions(-) 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 56ba5ecb..61ac0edb 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 @@ -41,7 +41,6 @@ export class CopyTransactionHashComponent { ngOnInit() {} ngOnChanges(changes: SimpleChanges) { - console.log(this.tokenStorageService.getNetwork()); if (changes) { this.tokenStorageService.removeItem('network'); this.tokenStorageService.setItem('network', this.networkWallet); @@ -70,7 +69,6 @@ export class CopyTransactionHashComponent { } redirect(network: string) { - console.log(network); if (network === 'BEP20') { this.urlSmartContrat = bscan + this.transactionHash; } else if (this.tokenStorageService.getNetwork() === 'ERC20') { From e0f79f3c1fb282e04a89dc19490e1fc0f5fa8faa Mon Sep 17 00:00:00 2001 From: skanderKhabou Date: Fri, 26 Apr 2024 18:00:53 +0100 Subject: [PATCH 3/3] fix transac hash redirect for campaign owner --- .../farm-post-card.component.html | 113 +++++++++++------- 1 file changed, 68 insertions(+), 45 deletions(-) diff --git a/src/app/campaigns/components/farm-post-card/farm-post-card.component.html b/src/app/campaigns/components/farm-post-card/farm-post-card.component.html index 63039fd9..fd31129b 100755 --- a/src/app/campaigns/components/farm-post-card/farm-post-card.component.html +++ b/src/app/campaigns/components/farm-post-card/farm-post-card.component.html @@ -44,19 +44,18 @@ onerror="this.src='/assets/Images/campagne/twitter_cover.svg'" class="cmp-img2" /> - + - + + [src]="prom.mediaUrl" + onerror="this.src='/assets/Images/campagne/instagramm.svg'" + class="cmp-img2" + /> - - + -

- - - - {{ prom.applyDate | date: 'MM/dd/yyyy':undefined:localId || '' }} - - + + + {{ prom.applyDate | date: 'MM/dd/yyyy':undefined:localId || '' }} + +

- - - {{ prom.applyDate | date: 'dd/MM/yyyy ':undefined:localId || '' }} - -

- -
@@ -610,10 +618,14 @@ class="buttom_camp3" (click)="getMyGains(prom)" [disabled]="!harvestAvailable" - *ngIf="prom.type === 'harvest' && !isOwner && prom.campaign.remuneration !== 'publication'" + *ngIf=" + prom.type === 'harvest' && + !isOwner && + prom.campaign.remuneration !== 'publication' + " [ngClass]="{ graybtn: !harvestAvailable }" > - + - - + {{ 'wait_harvest' | translate }} - - + {{ harvestAvailableIn }} @@ -651,11 +666,17 @@ class="buttom_camp3" (click)="getMyGains(prom)" [disabled]="prom.campaign.type !== 'finished' || !harvestAvailable" - *ngIf="prom.type === 'harvest' && !isOwner && prom.campaign.remuneration === 'publication'" - [ngClass]="{ graybtn: prom.campaign.type === 'apply' || !harvestAvailable }" + *ngIf=" + prom.type === 'harvest' && + !isOwner && + prom.campaign.remuneration === 'publication' + " + [ngClass]="{ + graybtn: prom.campaign.type === 'apply' || !harvestAvailable + }" > - - + @@ -674,19 +695,21 @@ }}.svg" /> - - + {{ 'wait_harvest' | translate }} - - - {{ harvestAvailableIn}} + + {{ harvestAvailableIn }} -