-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fe/fix white screen #1551
Fe/fix white screen #1551
Conversation
WalkthroughThe changes across the four files primarily involve the introduction of optional chaining ( Changes
Poem
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 5
Configuration used: CodeRabbit UI
Files selected for processing (4)
- packages/synapse-interface/components/Portfolio/Transaction/MostRecentTransaction.tsx (1 hunks)
- packages/synapse-interface/slices/transactions/updater.tsx (10 hunks)
- packages/synapse-interface/utils/hooks/useFallbackBridgeDestinationQuery.tsx (1 hunks)
- packages/synapse-interface/utils/hooks/useFallbackBridgeOriginQuery.tsx (2 hunks)
Additional comments: 4
packages/synapse-interface/utils/hooks/useFallbackBridgeDestinationQuery.tsx (1)
- 113-119: The use of optional chaining here is a good practice to prevent potential null or undefined errors. However, ensure that the comparison
transaction?.toInfo === destinationInfo
is the intended logic as it will return false iftransaction?.toInfo
is undefined due to optional chaining.packages/synapse-interface/utils/hooks/useFallbackBridgeOriginQuery.tsx (2)
49-55: The use of optional chaining (
?.
) here is a good practice to avoid potential null or undefined errors. It ensures that thesome
method is only called iffallbackQueryPendingTransactions
is defined.96-112: Again, the use of optional chaining (
?.
) is a good practice to avoid potential null or undefined errors. It ensures that thesome
method is only called iffallbackQueryPendingTransactions
,fallbackQueryHistoricalTransactions
, anduserHistoricalTransactions
are defined.packages/synapse-interface/slices/transactions/updater.tsx (1)
- 287-301: The use of optional chaining (
?.
) here is a good practice to avoid potentialTypeError
when the object isundefined
ornull
. However, the code could be simplified by removing the redundant checks foruserHistoricalTransactions
andfallbackQueryHistoricalTransactions
before using optional chaining. The optional chaining operator already checks if the object isnull
orundefined
before attempting to access its properties.- const isCompleted: boolean = - userHistoricalTransactions?.some( - (historicalTransaction: BridgeTransaction) => { - return ( - historicalTransaction.fromInfo.txnHash === - pendingBridgeTransaction.transactionHash </blockquote></details></blockquote></details> </details>
Summary by CodeRabbit
15985bfbf6ccdab5e16af13299295087bf328330: synapse-interface preview link