widthdraw and deposit

This commit is contained in:
2026-06-09 21:04:22 +03:30
parent 95516ee2d8
commit 689c51c27d
26 changed files with 1228 additions and 522 deletions
+6 -3
View File
@@ -1,10 +1,13 @@
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";
import type { WalletAssetsSummary } from '@/models/walletAssets'
import type { Transaction } from '@/models/transaction'
export const getWallet = async () => await useAxios.get<Wallet>(`/customer/wallet/me`)
export const getWalletAssets = async () =>
await useAxios.get<WalletAssetsSummary>(`/customer/wallet/assets`)
export const withdraw = async (obj: Transaction): Promise<any> => {
return await useAxios.post<Transaction>(`/customer/wallet/withdraw`, obj)
}
@@ -24,5 +27,5 @@ export async function deleteCard(id: number) {
export const getActivatedCards = async () => await useAxios.get<Card[]>(`/customer/account/active`)
export const confirmCode = async (params: WithdrawConfirm): Promise<any> => {
return await useAxios.post(`/customer/wallet/withdraw/otp` , params)
return await useAxios.post(`/customer/wallet/withdraw/otp`, params)
}