import { ref } from 'vue' import {defineStore} from "pinia"; import type {Wallet} from "@/models/wallet"; import {getWallet} from "@/api/wallet"; export const useWalletStore = defineStore('wallet', () => { const walletInfo = ref(undefined) async function getMyWallet() { try { walletInfo.value = await getWallet() return walletInfo.value } catch (e) { console.log(e) } } return { walletInfo, getMyWallet } })