card to card

This commit is contained in:
hamid zarghami
2025-02-06 18:35:15 +03:30
parent 9a923f931f
commit 2c92a73e74
7 changed files with 142 additions and 43 deletions
+15 -1
View File
@@ -1,6 +1,6 @@
import { useMutation, useQuery } from "@tanstack/react-query";
import * as api from "../service/WalletService";
import { PaymentType } from "../types/WalletTypes";
import { DepositTransferType, PaymentType } from "../types/WalletTypes";
export const useGetGetWays = () => {
return useQuery({
@@ -14,3 +14,17 @@ export const usePayment = () => {
mutationFn: (variables: PaymentType) => api.payment(variables),
});
};
export const useGetBankAccount = () => {
return useQuery({
queryKey: ["bankAccount"],
queryFn: api.getBankAccount,
});
};
export const useDepositTransfer = () => {
return useMutation({
mutationFn: (variables: DepositTransferType) =>
api.depositTransfer(variables),
});
};