card to card
This commit is contained in:
@@ -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),
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user