Skip to content

Commit

Permalink
token preview
Browse files Browse the repository at this point in the history
  • Loading branch information
waelhanfi04 committed Sep 29, 2023
1 parent 2a9b7d5 commit 63fd261
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ <h3 class="modal_title w-fit mx-auto">{{'addToken.select_token' | translate }}</
<div class="row">
<div
class="col-sm-4 col-4"
*ngFor="let crypto of filterList.slice(0, 6); let i = index"
*ngFor="let crypto of resultfilterList; let i = index"
(click)="tokenToSelect(crypto)"
>
<div class="tokens_preview d-flex p-2 mb-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export class DropdownCryptoNetworkComponent
dataList: any = [];
defaultcurr: any;
defaultcurrbtt: any;
resultfilterList: any;
quantity: any = 0;
tokenSearch = new FormControl('');
@Input() cryptoSymbolCampaign: string = '';
Expand Down Expand Up @@ -396,6 +397,16 @@ export class DropdownCryptoNetworkComponent
return index === self.findIndex((obj:any) => obj.key === item.key);
});
this.filterList = this.campaignCryptoList;

const bandIndex = this.filterList.findIndex(
(item: { key: string; }) => item.key === 'SATT'
);

this.resultfilterList = this.filterList.slice(
Math.max(0, bandIndex - 5),
Math.min(bandIndex + 1, this.filterList.length)
);

this.showSearchNewTokenContainer = false;
this.openModal(content);
}
Expand Down

0 comments on commit 63fd261

Please sign in to comment.