diff --git a/.changeset/nervous-gorillas-ring.md b/.changeset/nervous-gorillas-ring.md new file mode 100644 index 0000000000..7521d69dd6 --- /dev/null +++ b/.changeset/nervous-gorillas-ring.md @@ -0,0 +1,5 @@ +--- +'ui': minor +--- + +fix: account page issue diff --git a/packages/ui/src/screens/account_details/components/transactions/index.tsx b/packages/ui/src/screens/account_details/components/transactions/index.tsx index 4779314a14..1ff3d56870 100644 --- a/packages/ui/src/screens/account_details/components/transactions/index.tsx +++ b/packages/ui/src/screens/account_details/components/transactions/index.tsx @@ -9,7 +9,7 @@ import { readTx } from '@/recoil/settings'; import { useTransactions } from '@/screens/account_details/components/transactions/hooks'; import useStyles from '@/screens/account_details/components/transactions/styles'; -const Transactions: FC = (props) => { +const Transactions: FC = (props) => { const txListFormat = useRecoilValue(readTx); const { classes, cx } = useStyles(); const { t } = useAppTranslation('validators'); @@ -32,7 +32,7 @@ const Transactions: FC = (props) => { isNextPageLoading={state.isNextPageLoading} loadNextPage={loadNextPage} loadMoreItems={loadMoreItems} - isItemLoaded={isItemLoaded} + isItemLoaded={isItemLoaded || !props.loading} /> ) : ( = (props) => { isNextPageLoading={state.isNextPageLoading} loadNextPage={loadNextPage} loadMoreItems={loadMoreItems} - isItemLoaded={isItemLoaded} + isItemLoaded={isItemLoaded || !props.loading} /> )} diff --git a/packages/ui/src/screens/account_details/hooks.ts b/packages/ui/src/screens/account_details/hooks.ts index 0698be1c90..6a3592468b 100644 --- a/packages/ui/src/screens/account_details/hooks.ts +++ b/packages/ui/src/screens/account_details/hooks.ts @@ -31,6 +31,7 @@ const defaultTokenUnit: TokenUnit = { const initialState: AccountDetailState = { loading: true, + balanceLoading: true, exists: true, desmosProfile: null, overview: { @@ -196,7 +197,7 @@ const formatOtherTokens = (data: Data) => { // ========================== const formatAllBalance = (data: Data) => { const stateChange: Partial = { - loading: false, + balanceLoading: false, }; stateChange.rewards = formatRewards(data); diff --git a/packages/ui/src/screens/account_details/index.tsx b/packages/ui/src/screens/account_details/index.tsx index 5a68e826dd..6d28e31fd3 100644 --- a/packages/ui/src/screens/account_details/index.tsx +++ b/packages/ui/src/screens/account_details/index.tsx @@ -53,7 +53,7 @@ const AccountDetails = () => { /> - + diff --git a/packages/ui/src/screens/account_details/types.ts b/packages/ui/src/screens/account_details/types.ts index ab96035783..9c9bbdeb32 100644 --- a/packages/ui/src/screens/account_details/types.ts +++ b/packages/ui/src/screens/account_details/types.ts @@ -25,6 +25,7 @@ export interface RewardsType { export interface AccountDetailState { loading: boolean; + balanceLoading: boolean; exists: boolean; desmosProfile: DesmosProfile | null; overview: OverviewType;