diff --git a/src/pages/workspace/companyCards/addNew/CardTypeStep.tsx b/src/pages/workspace/companyCards/addNew/CardTypeStep.tsx index f9171a79eed4..7fded06b75f6 100644 --- a/src/pages/workspace/companyCards/addNew/CardTypeStep.tsx +++ b/src/pages/workspace/companyCards/addNew/CardTypeStep.tsx @@ -65,6 +65,9 @@ function CardTypeStep() { const [typeSelected, setTypeSelected] = useState(); const [isError, setIsError] = useState(false); const data = getAvailableCompanyCardTypes({translate, typeSelected, styles: styles.mr3}); + const {bankName, selectedBank, feedType} = addNewCard?.data ?? {}; + const isOtherBankSelected = selectedBank === CONST.COMPANY_CARDS.BANKS.OTHER; + const isNewCardTypeSelected = typeSelected !== feedType; const submit = () => { if (!typeSelected) { @@ -74,6 +77,7 @@ function CardTypeStep() { step: CONST.COMPANY_CARDS.STEP.CARD_INSTRUCTIONS, data: { feedType: typeSelected, + bankName: isNewCardTypeSelected && isOtherBankSelected ? '' : bankName, }, isEditing: false, });