Skip to content

Commit

Permalink
Minor improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
VickyStash committed Aug 28, 2024
1 parent dc83aa6 commit 89b6e18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/libs/actions/Card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,9 @@ function updateExpensifyCardLimitType(workspaceAccountID: number, cardID: number
API.write(WRITE_COMMANDS.UPDATE_EXPENSIFY_CARD_LIMIT_TYPE, parameters, {optimisticData, successData, failureData});
}

function deactivateCard(workspaceAccountID: number, cardID: number, card?: Card) {
function deactivateCard(workspaceAccountID: number, card?: Card) {
const authToken = NetworkStore.getAuthToken();
const cardID = card?.cardID ?? -1;

if (!authToken) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function WorkspaceExpensifyCardDetailsPage({route}: WorkspaceExpensifyCardDetail

const deactivateCard = () => {
setIsDeactivateModalVisible(false);
Card.deactivateCard(workspaceAccountID, Number(cardID), card);
Card.deactivateCard(workspaceAccountID, card);
Navigation.goBack();
};

Expand Down

0 comments on commit 89b6e18

Please sign in to comment.