Merge pull request #2581 from ecency/sa/refresh-bug

[Bug Fix] pull to refresh causing crash in points screen inside wallet
This commit is contained in:
Feruz M 2023-01-12 20:42:07 +05:30 committed by GitHub
commit b8a1ec8d45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -652,7 +652,7 @@
"amount_information": "Drag the slider to adjust the amount", "amount_information": "Drag the slider to adjust the amount",
"amount": "Amount", "amount": "Amount",
"memo": "Memo", "memo": "Memo",
"information": "Are you sure to transfer funds?", "information": "Continue transaction?",
"amount_desc": "Balance", "amount_desc": "Balance",
"memo_desc": "This memo is public", "memo_desc": "This memo is public",
"convert_desc": "Convert takes 3.5 days and NOT recommended IF HBD price is higher than $1", "convert_desc": "Convert takes 3.5 days and NOT recommended IF HBD price is higher than $1",

View File

@ -95,7 +95,7 @@ const AssetDetailsScreen = ({ navigation, route }: AssetDetailsScreenProps) => {
const _fetchDetails = async (refresh = false) => { const _fetchDetails = async (refresh = false) => {
if (refresh) { if (refresh) {
walletQuery.refresh(); walletQuery?.refetch();
} else if (noMoreActivities || loading) { } else if (noMoreActivities || loading) {
console.log('Skipping transaction fetch', completedActivities.lastItem?.trxIndex); console.log('Skipping transaction fetch', completedActivities.lastItem?.trxIndex);
return; return;
@ -221,7 +221,7 @@ const AssetDetailsScreen = ({ navigation, route }: AssetDetailsScreenProps) => {
header={_renderHeaderComponent} header={_renderHeaderComponent}
completedActivities={completedActivities} completedActivities={completedActivities}
pendingActivities={coinActivities?.pending || []} pendingActivities={coinActivities?.pending || []}
refreshing={refreshing || walletQuery.isRefreshing} refreshing={refreshing || walletQuery.isRefetching}
loading={loading} loading={loading}
isEngine={coinData?.isEngine} isEngine={coinData?.isEngine}
onEndReached={_fetchDetails} onEndReached={_fetchDetails}