From ae6ac10f74ac268fb0d2c2971bc071e957498a0d Mon Sep 17 00:00:00 2001 From: Louuuuuuuuuuuuu <124356992+hichri-louay@users.noreply.github.com> Date: Tue, 20 Feb 2024 16:17:20 +0100 Subject: [PATCH] wip remove unused function (#689) --- .../remuneration/remuneration.component.ts | 34 ++----------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/src/app/campaigns/components/remuneration/remuneration.component.ts b/src/app/campaigns/components/remuneration/remuneration.component.ts index 34a6473e..fc4447f7 100755 --- a/src/app/campaigns/components/remuneration/remuneration.component.ts +++ b/src/app/campaigns/components/remuneration/remuneration.component.ts @@ -248,10 +248,9 @@ export class RemunerationComponent implements OnInit, OnDestroy { ngOnInit(): void { this.cdref.markForCheck(); this.parentFunction().subscribe(); - //this.getUserCrypto('123'); this.activatedRoute.params.subscribe((params) => { if(!!params.id) { - this.getUserCrypto(params.id); + this.getCampaignsData(params.id); } }) this.saveForm(); @@ -694,37 +693,8 @@ export class RemunerationComponent implements OnInit, OnDestroy { return new UntypedFormArray(controls); } - getUserCrypto(id: string) { - this.walletFacade.cryptoList$ - .pipe(takeUntil(this.isDestroyed$)) - .subscribe((data: any) => { - data = JSON.parse(JSON.stringify(data)); - this.dataList = data; - Object.preventExtensions(this.dataList); - this.cryptoQuantity = ( - this.dataList.find( - (crypto: any) => crypto.symbol === this.draftData.currency.name - ) as any - )?.quantity; - this.dataList = [ - ...this.dataList.filter((data: any) => data.symbol === 'SATT'), - ...this.dataList.filter((data: any) => data.symbol === 'USDT'), - ...this.dataList.filter((data: any) => data.symbol === 'DAI'), - ...this.dataList.filter((data: any) => data.symbol === 'SATTBEP20'), - ...this.dataList.filter((data: any) => data.symbol === 'BUSD'), - ...this.dataList.filter((data: any) => data.symbol === 'SATTPOLYGON'), - ...this.dataList.filter((data: any) => data.symbol === 'MATIC'), - ...this.dataList.filter((data: any) => data.symbol === 'SATTBTT'), - ...this.dataList.filter((data: any) => data.symbol === 'BTT'), - ...this.dataList.filter((data: any) => data.symbol === 'SATTTRON'), - ...this.dataList.filter((data: any) => data.symbol === 'TRX'), - ...this.dataList.filter((data: any) => data.symbol === 'AA'), - ]; - }); - - + getCampaignsData(id: string) { this.campaignService.getOneById(id).subscribe((response: any) => { - this.selectedNetworkValue = response.data.token.type; this.res = this.cryptodata;