Skip to content

Commit

Permalink
hotfix: ibc token sort decs by id (#3685)
Browse files Browse the repository at this point in the history
  • Loading branch information
TranTrungTien authored Aug 29, 2024
1 parent baf4d7b commit 9e36851
Showing 1 changed file with 27 additions and 5 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;
}
}

0 comments on commit 9e36851

Please sign in to comment.