aboutsummaryrefslogtreecommitdiff
path: root/src/models/walletSlice.ts
blob: 83eda626421b12582852c050dccfa3144a45795c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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