-
Notifications
You must be signed in to change notification settings - Fork 273
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
BLO-835 fix: activity errors #1822
Conversation
return ( | ||
<> | ||
{Object.entries(activity).map(([dateLabel, transactions]) => ( | ||
<Fragment key={dateLabel}> | ||
<HeaderCell>{dateLabel}</HeaderCell> | ||
{transactions.map((transaction) => { | ||
if (isActivityTransaction(transaction)) { |
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.
This was refactored into AccountActivityItem
so it can be more easily wrapped in an error boundary
return ( | ||
<CellStack> | ||
<CellStack key={accountIdentifier} flex={1}> |
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.
key
to ensure the component re-renders on network change
@@ -146,6 +146,7 @@ export const useArgentExplorerAccountTransactionsInfinite = ( | |||
) | |||
return useSWRInfinite<IExplorerTransaction[]>(key, argentApiFetcher, { | |||
revalidateAll: true, | |||
shouldRetryOnError: false /** expect errors on unsupported networks */, |
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.
isnt this risky ? Like I understand that we should expect errors for some networks but retryOnError allows to course correct if the backend is restarting for example
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.
Risk both ways - at the moment we see frequent 500 errors which lead to throttling if the extension keeps retrying. If there are errors then the user will see fallback local tx anyway.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Issue / feature description
'Activity' screen not resilient to unexpected conditions of network / backend / individual tx parsing
Changes
Checklist