-
Notifications
You must be signed in to change notification settings - Fork 75
fix(wallet): unblock Hive Engine token transfers and harden HE reads #3254
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,5 +1,5 @@ | ||||||||||||||
| import React, { useEffect, useRef, Fragment, useMemo } from 'react'; | ||||||||||||||
| import { View, AppState, AppStateStatus } from 'react-native'; | ||||||||||||||
| import { View, Text, TouchableOpacity, AppState, AppStateStatus } from 'react-native'; | ||||||||||||||
| import { isArray } from 'lodash'; | ||||||||||||||
|
|
||||||||||||||
| // Containers | ||||||||||||||
|
|
@@ -239,6 +239,29 @@ const WalletScreen = ({ navigation }: { navigation: any }) => { | |||||||||||||
| /> | ||||||||||||||
| ); | ||||||||||||||
|
|
||||||||||||||
| // When the portfolio request fails (e.g. the Ecency proxy hiccups) surface a Retry | ||||||||||||||
| // banner. It is rendered above the list rather than as ListEmptyComponent because | ||||||||||||||
| // React Query keeps the last successful data on error — so a failed *refresh* of an | ||||||||||||||
| // already-loaded wallet has a non-empty list and would otherwise show no indication | ||||||||||||||
| // the data is stale. Shown only once a fetch has actually failed and settled. | ||||||||||||||
| const _renderErrorBanner = () => { | ||||||||||||||
| if (!walletQuery.isError || walletQuery.isFetching) { | ||||||||||||||
| return null; | ||||||||||||||
| } | ||||||||||||||
| return ( | ||||||||||||||
| <View style={styles.errorBanner}> | ||||||||||||||
| <Text style={styles.errorText}> | ||||||||||||||
| {intl.formatMessage({ id: 'alert.wallet_refresh_failed' })} | ||||||||||||||
| </Text> | ||||||||||||||
| <TouchableOpacity style={styles.headerActionButton} onPress={_onRefresh}> | ||||||||||||||
| <Text style={styles.headerActionButtonText}> | ||||||||||||||
| {intl.formatMessage({ id: 'alert.something_wrong_reload' })} | ||||||||||||||
| </Text> | ||||||||||||||
|
Comment on lines
+257
to
+259
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use an existing locale id for the retry button label. On Line 258, Suggested fix- {intl.formatMessage({ id: 'alert.try_again' })}
+ {intl.formatMessage({ id: 'try_again' })}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
| </TouchableOpacity> | ||||||||||||||
| </View> | ||||||||||||||
| ); | ||||||||||||||
| }; | ||||||||||||||
|
|
||||||||||||||
| const _renderWalletHeader = () => ( | ||||||||||||||
| <WalletHeader | ||||||||||||||
| assets={walletQuery.data} | ||||||||||||||
|
greptile-apps[bot] marked this conversation as resolved.
|
||||||||||||||
|
|
@@ -256,6 +279,7 @@ const WalletScreen = ({ navigation }: { navigation: any }) => { | |||||||||||||
| <LoggedInContainer> | ||||||||||||||
| {() => ( | ||||||||||||||
| <View style={styles.listWrapper}> | ||||||||||||||
| {_renderErrorBanner()} | ||||||||||||||
| <FlatList | ||||||||||||||
| data={walletListData} | ||||||||||||||
| style={globalStyles.tabBarBottom} | ||||||||||||||
|
|
||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.