Skip to content

Commit

Permalink
chore: improve transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
icfor committed Feb 28, 2024
1 parent 8a7233c commit 322ade6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/web-namada/src/graphql/general/transactions.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ subscription TransactionsListener($limit: Int = 7, $offset: Int = 0) {
block {
timestamp
}
tx_type
}
}

Expand Down
3 changes: 2 additions & 1 deletion apps/web-namada/src/graphql/types/general_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2481,7 +2481,7 @@ export type TransactionsListenerSubscriptionVariables = Exact<{
}>;


export type TransactionsListenerSubscription = { transactions: Array<{ __typename?: 'transaction', height: any, hash: string, success: boolean, block?: { __typename?: 'block', timestamp: any } | null }> };
export type TransactionsListenerSubscription = { transactions: Array<{ __typename?: 'transaction', height: any, hash: string, success: boolean, tx_type: string, block?: { __typename?: 'block', timestamp: any } | null }> };

export type TransactionsQueryVariables = Exact<{
limit?: InputMaybe<Scalars['Int']>;
Expand Down Expand Up @@ -2785,6 +2785,7 @@ export const TransactionsListenerDocument = gql`
block {
timestamp
}
tx_type
}
}
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ const formatTransactions = (data: TransactionsListenerSubscription) =>
return {
height: x.height,
hash: x.hash,
type: convertedMsgType,
type: [x.tx_type],
success: x.success,
timestamp: x.block?.timestamp,
tx_type: x.tx_type,
messages: 0,
};
}) ?? [];
Expand Down

0 comments on commit 322ade6

Please sign in to comment.