Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into tmp/20241210
Browse files Browse the repository at this point in the history
  • Loading branch information
richardo2016x committed Dec 10, 2024
2 parents b61ffe6 + 79e5d0a commit f113fb4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 25 deletions.
40 changes: 16 additions & 24 deletions apps/mobile/src/components/AccountSwitcher/OnScreenHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { FontNames } from '@/core/utils/fonts';
import { useTheme2024 } from '@/hooks/theme';
import { createGetStyles2024, makeDebugBorder } from '@/utils/styles';
import { useEffect, useMemo } from 'react';
import { createGetStyles2024 } from '@/utils/styles';
import { useMemo } from 'react';
import { Text, View } from 'react-native';

// caret-down-cc.svg
Expand Down Expand Up @@ -65,13 +64,6 @@ export function ScreenHeaderAccountSwitcher({
}
});

const needShowAllAccounts = !!myAddresses.length;
if (!isSceneUsingAllAccounts && !finalSceneCurrentAccount?.address) {
return titleTextNode;
} else if (isSceneUsingAllAccounts && !needShowAllAccounts) {
return titleTextNode;
}

const IconCom = isLight ? RcCaretDownCircleCC : RcCaretDownCircleDarkCC;

return (
Expand All @@ -87,20 +79,20 @@ export function ScreenHeaderAccountSwitcher({
}}>
{titleTextNode}
<View style={styles.addressRow}>
{!isSceneUsingAllAccounts
? !!finalSceneCurrentAccount && (
<Text style={styles.address}>
{finalSceneCurrentAccount.aliasName ||
ellipsisAddress(finalSceneCurrentAccount?.address)}
</Text>
)
: needShowAllAccounts && (
<Text style={styles.address}>
{t('component.accountSwitcher.screenHeaderSubTitle', {
count: myAddresses.length,
})}
</Text>
)}
{!isSceneUsingAllAccounts ? (
!!finalSceneCurrentAccount && (
<Text style={styles.address}>
{finalSceneCurrentAccount.aliasName ||
ellipsisAddress(finalSceneCurrentAccount?.address)}
</Text>
)
) : (
<Text style={styles.address}>
{t('component.accountSwitcher.screenHeaderSubTitle', {
count: myAddresses.length,
})}
</Text>
)}
{!disableSwitch && (
<IconCom
style={[styles.addressCaretIcon, isOpen && styles.reverseCaret]}
Expand Down
4 changes: 3 additions & 1 deletion apps/mobile/src/screens/Transaction/MultiAddressHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ function History({ isTestnet = false }: { isTestnet?: boolean }): JSX.Element {
if (!isReady.current) {
isReady.current = true;
}
await waitQueueFinished(queue);
if (accountList.length > 0) {
await waitQueueFinished(queue);
}
return { list };
};

Expand Down

0 comments on commit f113fb4

Please sign in to comment.