mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 18:00:17 +01:00
Merge pull request #6753 from BlueWallet/walletad
FIX: Wallet addresses were not visible
This commit is contained in:
commit
2c26986c92
@ -11,6 +11,7 @@ import { DetailViewStackParamList } from '../../navigation/DetailViewStackParamL
|
||||
import { useExtendedNavigation } from '../../hooks/useExtendedNavigation';
|
||||
import SegmentedControl from '../../components/SegmentControl';
|
||||
import loc from '../../loc';
|
||||
import { BitcoinUnit } from '../../models/bitcoinUnits';
|
||||
|
||||
export const TABS = {
|
||||
EXTERNAL: 'receive',
|
||||
@ -123,10 +124,10 @@ const WalletAddresses: React.FC = () => {
|
||||
const addressList = useRef<FlatList<Address>>(null);
|
||||
const wallet = wallets.find((w: any) => w.getID() === walletID);
|
||||
|
||||
const balanceUnit = wallet?.getPreferredBalanceUnit();
|
||||
const balanceUnit = wallet?.getPreferredBalanceUnit() ?? BitcoinUnit.BTC;
|
||||
const isWatchOnly = wallet?.type === WatchOnlyWallet.type;
|
||||
const walletInstance = isWatchOnly ? wallet._hdWalletInstance : wallet;
|
||||
const allowSignVerifyMessage = wallet && 'allowSignVerifyMessage' in wallet && wallet.allowSignVerifyMessage();
|
||||
const allowSignVerifyMessage = (wallet && 'allowSignVerifyMessage' in wallet && wallet.allowSignVerifyMessage()) ?? false;
|
||||
|
||||
const { colors } = useTheme();
|
||||
const { setOptions } = useExtendedNavigation<NavigationProps>();
|
||||
@ -189,9 +190,9 @@ const WalletAddresses: React.FC = () => {
|
||||
|
||||
const renderRow = useCallback(
|
||||
({ item }: { item: Address }) => {
|
||||
return balanceUnit && allowSignVerifyMessage ? (
|
||||
return (
|
||||
<AddressItem item={item} {...item} balanceUnit={balanceUnit} walletID={walletID} allowSignVerifyMessage={allowSignVerifyMessage} />
|
||||
) : null;
|
||||
);
|
||||
},
|
||||
[balanceUnit, walletID, allowSignVerifyMessage],
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user