aboutsummaryrefslogtreecommitdiff
path: root/src/models/walletSlice.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/walletSlice.ts')
-rw-r--r--src/models/walletSlice.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/models/walletSlice.ts b/src/models/walletSlice.ts
new file mode 100644
index 0000000..83eda62
--- /dev/null
+++ b/src/models/walletSlice.ts
@@ -0,0 +1,23 @@
+import {createSlice, PayloadAction} from '@reduxjs/toolkit'
+
+import {UserWalletBalance} from "@/api";
+
+
+const initialState: UserWalletBalance = {};
+
+
+const walletSlice = createSlice({
+ name: 'wallet',
+ initialState,
+ reducers: {
+ setWallet(state, action: PayloadAction<UserWalletBalance>) {
+ return action.payload;
+ }
+ }
+})
+
+export const {
+ setWallet,
+} = walletSlice.actions;
+export default walletSlice.reducer
+