Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/pages/settings/Wallet/PersonalCardDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import {DYNAMIC_ROUTES} from '@src/ROUTES';
import type SCREENS from '@src/SCREENS';
import type {CompanyCardFeed} from '@src/types/onyx';

import {format} from 'date-fns';
import React from 'react';
Expand Down Expand Up @@ -161,7 +160,7 @@ function PersonalCardDetailsPage({route}: PersonalCardDetailsPageProps) {
: translate('workspace.moreFeatures.companyCards.neverUpdated');

const getCardIconSource = () => {
return getCardFeedIcon(cardBank as CompanyCardFeed, illustrations, companyCardFeedIcons);
return getCardFeedIcon(card?.bank, illustrations, companyCardFeedIcons);
};

const navigateToTransactions = () => navigateToCardTransactions(cardID);
Expand All @@ -175,7 +174,7 @@ function PersonalCardDetailsPage({route}: PersonalCardDetailsPageProps) {
return <NotFoundPage />;
}

const plaidUrl = getPlaidInstitutionIconUrl(cardBank as CompanyCardFeed);
const plaidUrl = getPlaidInstitutionIconUrl(card?.bank);

return (
<ScreenWrapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {getPersonalCardBankConnection} from '@userActions/getCompanyCardBankConn
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import {DYNAMIC_ROUTES} from '@src/ROUTES';
import type {CompanyCardFeed} from '@src/types/onyx';

import {useEffect, useRef} from 'react';

Expand All @@ -21,8 +20,8 @@ function useFixPersonalCardConnection(cardID: string) {

const [cardList] = useOnyx(ONYXKEYS.CARD_LIST);
const card = cardList?.[cardID];
const bankDisplayName = card ? getBankName(card.bank as CompanyCardFeed) : '';
const isPlaid = !!(card?.bank && getPlaidInstitutionId(card.bank as CompanyCardFeed));
const bankDisplayName = card ? getBankName(card.bank) : '';
const isPlaid = !!(card?.bank && getPlaidInstitutionId(card.bank));
const url = isPlaid ? null : getPersonalCardBankConnection(bankDisplayName);
const country = card?.nameValuePairs?.country ?? CONST.COUNTRY.US;
// Matches the wallet row and the card details page, so a card they offer a fix for takes the reconnect flow here
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import MobileBackgroundImage from '@assets/images/home-background--mobile.svg';

import {useSession} from '@components/OnyxListItemProvider';

import useStyleUtils from '@hooks/useStyleUtils';
Expand All @@ -11,14 +9,15 @@ import TransitionTracker from '@libs/Navigation/TransitionTracker';
import CONST from '@src/CONST';
import {useSplashScreenState} from '@src/SplashScreenStateContext';

import type {ImageSourcePropType} from 'react-native';

import {Image} from 'expo-image';
import React, {useEffect, useState} from 'react';
import Reanimated, {Easing, useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated';

import type BackgroundImageProps from './types';

// The native bundler registers this SVG as a numeric asset for Expo Image.
const MobileBackgroundImage = require<number>('@assets/images/home-background--mobile.svg');

function BackgroundImage({width}: BackgroundImageProps) {
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
Expand Down Expand Up @@ -64,7 +63,7 @@ function BackgroundImage({width}: BackgroundImageProps) {
<Reanimated.View style={[styles.signInBackground, StyleUtils.getWidthStyle(width), animatedStyle]}>
<Image
accessibilityIgnoresInvertColors
source={MobileBackgroundImage as ImageSourcePropType}
source={MobileBackgroundImage}
onLoadEnd={() => setOpacityAnimation()}
pointerEvents="none"
style={[styles.signInBackground, StyleUtils.getWidthStyle(width)]}
Expand Down
Loading