import useAxios from '@/utils/useAxios' import type { Card, Wallet, WithdrawConfirm } from '@/models/wallet' import type {Transaction} from '@/models/transaction' import type {Address} from "@/models/address"; export const getWallet = async () => await useAxios.get(`/customer/wallet/me`) export const withdraw = async (obj: Transaction): Promise => { return await useAxios.post(`/customer/wallet/withdraw`, obj) } export const deposit = async (obj: Transaction): Promise => { return await useAxios.post(`/customer/charge_account`, obj) } export const createCard = async (obj: Card): Promise => { return await useAxios.post(`/customer/account`, obj) } export async function deleteCard(id: number) { return await useAxios.delete(`customer/account/${id}`) } export const getActivatedCards = async () => await useAxios.get(`/customer/account/active`) export const confirmCode = async (params: WithdrawConfirm): Promise => { return await useAxios.post(`/customer/wallet/withdraw/otp` , params) }