Skip to content

Commit

Permalink
fix: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
limpbrains committed Oct 6, 2023
1 parent 0499d8b commit 8c1ac36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
14 changes: 3 additions & 11 deletions src/components/AssetCard.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import React, { memo, ReactElement } from 'react';
import { useSelector } from 'react-redux';
import { View, GestureResponderEvent, StyleSheet } from 'react-native';

import { ClockIcon } from '../styles/icons';
import { Text01M, Caption13M } from '../styles/text';
import { TouchableOpacity } from '../styles/components';
import Money from '../components/Money';
import { useSelector } from 'react-redux';
import Store from '../store/types';
import {
selectedNetworkSelector,
selectedWalletSelector,
} from '../store/reselect/wallet';
import { openChannelIdsSelector } from '../store/reselect/lightning';

const AssetCard = ({
Expand All @@ -29,11 +25,7 @@ const AssetCard = ({
testID?: string;
onPress: (event: GestureResponderEvent) => void;
}): ReactElement => {
const selectedWallet = useSelector(selectedWalletSelector);
const selectedNetwork = useSelector(selectedNetworkSelector);
const openChannelIds = useSelector((state: Store) => {
return openChannelIdsSelector(state, selectedWallet, selectedNetwork);
});
const openChannelIds = useSelector(openChannelIdsSelector);

const isTransferToSavings = openChannelIds.length === 0;

Expand Down
13 changes: 2 additions & 11 deletions src/screens/Wallets/WalletsDetail/BitcoinBreakdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,17 @@ import { useTranslation } from 'react-i18next';

import { View as ThemedView } from '../../../styles/components';
import { TransferIcon, SavingsIcon, CoinsIcon } from '../../../styles/icons';
import NetworkRow from './NetworkRow';
import { useBalance } from '../../../hooks/wallet';
import { RootNavigationProp } from '../../../navigation/types';
import { isGeoBlockedSelector } from '../../../store/reselect/user';
import {
selectedNetworkSelector,
selectedWalletSelector,
} from '../../../store/reselect/wallet';
import Store from '../../../store/types';
import { openChannelIdsSelector } from '../../../store/reselect/lightning';
import NetworkRow from './NetworkRow';

const BitcoinBreakdown = (): ReactElement => {
const { t } = useTranslation('wallet');
const navigation = useNavigation<RootNavigationProp>();
const isGeoBlocked = useSelector(isGeoBlockedSelector);
const selectedWallet = useSelector(selectedWalletSelector);
const selectedNetwork = useSelector(selectedNetworkSelector);
const openChannelIds = useSelector((state: Store) => {
return openChannelIdsSelector(state, selectedWallet, selectedNetwork);
});
const openChannelIds = useSelector(openChannelIdsSelector);
const {
onchainBalance,
lightningBalance,
Expand Down

0 comments on commit 8c1ac36

Please sign in to comment.