15 lines
364 B
TypeScript
15 lines
364 B
TypeScript
import { createAsyncThunk } from '@reduxjs/toolkit';
|
|
import { getWalletDetails } from '@api';
|
|
|
|
export const getWalletBalanceThunk = createAsyncThunk(
|
|
'wallet/getWalletBalance',
|
|
async (_, { rejectWithValue }) => {
|
|
try {
|
|
const data = await getWalletDetails();
|
|
return data;
|
|
} catch (error) {
|
|
return rejectWithValue(error);
|
|
}
|
|
},
|
|
);
|