widthdraw and deposit
This commit is contained in:
+6
-3
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user