aboutsummaryrefslogtreecommitdiff
path: root/src/models/walletSlice.ts
diff options
context:
space:
mode:
authorMax Nanis2025-06-09 16:05:52 +0700
committerMax Nanis2025-06-09 16:05:52 +0700
commit74890e251dee3e0f195583431cb48b9f3a58ecc9 (patch)
treea27ceee03999f18fd3ef2e0d44ba7deb39f0b6c8 /src/models/walletSlice.ts
parenta674d2e03de3bd048714d9c06e4bba9d9ecdb328 (diff)
downloadpanel-ui-74890e251dee3e0f195583431cb48b9f3a58ecc9.tar.gz
panel-ui-74890e251dee3e0f195583431cb48b9f3a58ecc9.zip
Cashout Methods page: adding walletSlice and cashoutmethodsSlice so they're in the stored state. Iterating with fix vs variable filters. Pulling old validators from old code and setting up the wallet fetch.
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
+