Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add correct TS interface for charge.dispute #7311

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from
Draft
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Explicitly pick props required for getDisputeStatus
Jinksi committed Sep 27, 2023
commit 308e3e75ea4d5c775be0d9d692903fa044a0309b
2 changes: 1 addition & 1 deletion client/utils/charge/index.ts
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ const failedOutcomeTypes = [ 'issuer_declined', 'invalid' ];
const blockedOutcomeTypes = [ 'blocked' ];

export const getDisputeStatus = (
dispute: null | Dispute = <Dispute>{}
dispute: null | Pick< Dispute, 'status' > = <Dispute>{}
): string => dispute?.status || '';

export const getChargeOutcomeType = ( charge: Charge = <Charge>{} ): string =>