Skip to content

Commit

Permalink
docs: add comments about the type declaration to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Dec 14, 2023
1 parent 7faab8f commit d56acfb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/models/Transaction/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export interface CellDep {

export interface Transaction {
transactionHash: string
// FIXME: this type declaration should be fixed by adding a transformation between internal state and response of API
blockNumber: number | string
blockTimestamp: number | string
transactionFee: string
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Address/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ export const Address = () => {
const transactionCounts: Record<'committed' | 'pending', number | '-'> = {
committed:
addressInfoQuery.isFetched && addressInfoQuery.data
? Number(addressInfoQuery.data.transactionsCount) ?? '-'
? // FIXME: this type convertion could be removed once the type declaration of Transaction is fixed
Number(addressInfoQuery.data.transactionsCount) ?? '-'
: '-',
pending: pendingTransactionCountQuery.isFetched ? pendingTransactionCountQuery.data ?? '-' : '-',
}
Expand Down

0 comments on commit d56acfb

Please sign in to comment.