Skip to content

Commit

Permalink
fix pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SzymczakJ committed Apr 26, 2024
1 parent c7a0f12 commit 0458752
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/settings/Wallet/Card/BaseGetPhysicalCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function BaseGetPhysicalCard({

const domainCards = CardUtils.getDomainCards(cardList)[domain] || [];
const cardToBeIssued = domainCards.find((card) => !card?.nameValuePairs?.isVirtual && card?.state === CONST.EXPENSIFY_CARD.STATE.STATE_NOT_ISSUED);
const cardID = cardToBeIssued?.cardID ?? 0;
const cardID = cardToBeIssued?.cardID.toString() ?? '';

useEffect(() => {
if (isRouteSet.current || !privatePersonalDetails || !cardList) {
Expand Down Expand Up @@ -148,7 +148,7 @@ function BaseGetPhysicalCard({
const updatedPrivatePersonalDetails = GetPhysicalCardUtils.getUpdatedPrivatePersonalDetails(draftValues);
// If the current step of the get physical card flow is the confirmation page
if (isConfirmation) {
Wallet.requestPhysicalExpensifyCard(cardID, session?.authToken ?? '', updatedPrivatePersonalDetails);
Wallet.requestPhysicalExpensifyCard(cardToBeIssued?.cardID ?? 0, session?.authToken ?? '', updatedPrivatePersonalDetails);
// Form draft data needs to be erased when the flow is complete,
// so that no stale data is left on Onyx
FormActions.clearDraftValues(ONYXKEYS.FORMS.GET_PHYSICAL_CARD_FORM);
Expand All @@ -165,7 +165,7 @@ function BaseGetPhysicalCard({
>
<HeaderWithBackButton
title={title}
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_WALLET_DOMAINCARD.getRoute(cardID.toString()))}
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_WALLET_DOMAINCARD.getRoute(cardID))}
/>
<Text style={[styles.textHeadline, styles.mh5, styles.mb5]}>{headline}</Text>
{renderContent({onSubmit, submitButtonText, children, onValidate})}
Expand Down

0 comments on commit 0458752

Please sign in to comment.