Skip to content

Commit

Permalink
Add type assertion for exported_deposits
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagesh Pai committed Dec 23, 2024
1 parent 9637247 commit 7441207
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions client/deposits/list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,22 +260,25 @@ export const DepositsList = (): JSX.Element => {
window.confirm( confirmMessage )
) {
try {
const { exported_deposits: exportedDeposits } = await apiFetch(
{
path: getDepositsCSV( {
userEmail,
locale,
dateAfter,
dateBefore,
dateBetween,
match,
statusIs,
statusIsNot,
storeCurrencyIs,
} ),
method: 'POST',
}
);
const {
exported_deposits: exportedDeposits,
} = await apiFetch< {
/** The total number of payouts that will be exported in the CSV */
exported_deposits: number;
} >( {
path: getDepositsCSV( {
userEmail,
locale,
dateAfter,
dateBefore,
dateBetween,
match,
statusIs,
statusIsNot,
storeCurrencyIs,
} ),
method: 'POST',
} );

createNotice(
'success',
Expand Down

0 comments on commit 7441207

Please sign in to comment.