Skip to content

Commit

Permalink
Release/euphoria 20240830 (#3687)
Browse files Browse the repository at this point in the history
* hotfix: ibc token sort decs by id (#3685) (#3686)

* fix: duplicate tab info
  • Loading branch information
TranTrungTien authored Aug 30, 2024
1 parent 37a69dc commit c7e2d07
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 11 deletions.
32 changes: 27 additions & 5 deletions src/app/core/services/token.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -704,9 +704,25 @@ export class TokenService extends CommonService {
txHash?: string;
}): Observable<any> {
const operationsDoc = `
query queryListTxIBC($denom: String = null, $limit: Int = null, $offset: Int = null, $address: String = null, $hash: String =null) {
query queryListTxIBC(
$denom: String = null
$limit: Int = null
$offset: Int = null
$address: String = null
$hash: String = null
$order: order_by = desc
) {
${this.envDB} {
ibc_ics20(where: {denom: {_eq: $denom}, _or: [{receiver: {_eq: $address}}, {sender: {_eq: $address}}], ibc_message: {tx_hash: {_eq: $hash}}}, limit: $limit, offset: $offset) {
ibc_ics20(
where: {
denom: { _eq: $denom }
_or: [{ receiver: { _eq: $address } }, { sender: { _eq: $address } }]
ibc_message: { tx_hash: { _eq: $hash } }
}
limit: $limit
offset: $offset
order_by: [{ id: $order }]
) {
denom
sender
receiver
Expand All @@ -723,7 +739,13 @@ export class TokenService extends CommonService {
}
}
}
ibc_ics20_aggregate(where: {denom: {_eq: $denom}, _or: [{receiver: {_eq: $address}}, {sender: {_eq: $address}}], ibc_message: {tx_hash: {_eq: $hash}}}) {
ibc_ics20_aggregate(
where: {
denom: { _eq: $denom }
_or: [{ receiver: { _eq: $address } }, { sender: { _eq: $address } }]
ibc_message: { tx_hash: { _eq: $hash } }
}
) {
aggregate {
count
}
Expand Down Expand Up @@ -975,10 +997,10 @@ export class TokenService extends CommonService {
name: SOCIAL_MEDIA[key]?.name,
icon: SOCIAL_MEDIA[key]?.icon,
url: socialProfiles[key],
}
};
socialMapping.push(social);
}
})
});
return socialMapping;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ export class TokenContentComponent implements OnInit {

ngOnInit(): void {
if (this.featureFlag.isEnabled(FeatureFlags.SetTokenInfo)) {
this.tabStaking = [TokenTab.Holders, TokenTab.Info];
this.tabIBC = [TokenTab.Transfers, TokenTab.Holders, TokenTab.Info];
this.tabToken = [TokenTab.Transfers, TokenTab.Holders, TokenTab.Contract, TokenTab.Info];
this.tabStaking = [TokenTab.Holders];
this.tabIBC = [TokenTab.Transfers, TokenTab.Holders];
this.tabToken = [TokenTab.Transfers, TokenTab.Holders, TokenTab.Contract];
}

this.linkAddress = this.route.snapshot.paramMap.get('contractAddress');
Expand Down Expand Up @@ -106,23 +106,22 @@ export class TokenContentComponent implements OnInit {
key: tab.key,
}));
this.tabsBackup = this.TABS;

this.route.queryParams.subscribe((params) => {
this.paramQuery = params?.a || '';
this.searchTemp = this.paramQuery;
this.handleSearch();
this.searchTemp = this.nameTagService.findNameTagByAddress(this.searchTemp);

if (this.featureFlag.isEnabled(FeatureFlags.SetTokenInfo)) {
if(!this.paramQuery){
if (!this.paramQuery) {
this.TABS.push({
key: TokenTab.Info,
value: 'Info',
});
this.tabsBackup = this.TABS;
}
}
this.tabsBackup = this.TABS;
});

if (local.getItem(STORAGE_KEYS.IS_VERIFY_TAB) == 'true') {
Expand Down

0 comments on commit c7e2d07

Please sign in to comment.