diff --git a/src/api/mutation/index.tsx b/src/api/mutation/index.tsx index 24636c4..24fc26f 100644 --- a/src/api/mutation/index.tsx +++ b/src/api/mutation/index.tsx @@ -8,6 +8,7 @@ import { useAppDelete } from './use-app-delete'; import { useAppRegister } from './use-app-register'; import { useAppUpdate } from './use-app-update'; import { useAuthorize } from './use-authorize'; +import { useBuy } from './use-buy'; import { useBuyContractForMultipleAccounts } from './use-buy-contract-for-multiple-accounts'; import { useCancel } from './use-cancel'; import { useCashierWithdrawalCancel } from './use-cashier-withdrawal-cancel'; @@ -87,6 +88,7 @@ export { useAppRegister, useAppUpdate, useAuthorize, + useBuy, useBuyContractForMultipleAccounts, useCancel, useCashierWithdrawalCancel, diff --git a/src/api/mutation/use-buy.tsx b/src/api/mutation/use-buy.tsx new file mode 100644 index 0000000..ac319c0 --- /dev/null +++ b/src/api/mutation/use-buy.tsx @@ -0,0 +1,11 @@ +import { useMutation } from '../../base'; +import { AugmentedMutationOptions } from '../../base/use-mutation'; + +export const useBuy = ({ ...props }: Omit, 'name'> = {}) => { + const { data, ...rest } = useMutation({ name: 'buy', ...props }); + + return { + data: data?.buy, + ...rest, + }; +};