15 lines
412 B
TypeScript

import { getWalletTransactions } from '@api';
import { createAsyncThunk } from '@reduxjs/toolkit';
export const getAllWalletTransactions = createAsyncThunk(
'wallet/getAllWalletTransactions',
async (_, { rejectWithValue }) => {
try {
const response = await getWalletTransactions();
return response;
} catch (error: any) {
return rejectWithValue(error.response.data);
}
},
);