sheba cardtocard online

This commit is contained in:
hamid zarghami
2025-02-08 09:19:07 +03:30
parent 2c92a73e74
commit f69b82efcc
4 changed files with 107 additions and 27 deletions
+8 -1
View File
@@ -10,6 +10,7 @@ import { useFormik } from 'formik'
import { DepositTransferType } from '../types/WalletTypes'
import * as Yup from 'yup'
import { useSingleUpload } from '../../ticket/hooks/useTicketData'
import { toast } from 'react-toastify'
const CardtoCard: FC = () => {
@@ -36,7 +37,13 @@ const CardtoCard: FC = () => {
formData.append('file', file)
upload.mutate(formData, {
onSuccess: (data) => {
depositTransfer.mutate({ ...values, transferReceiptUrl: data.data.url })
depositTransfer.mutate({ ...values, amount: +values.amount, transferReceiptUrl: data.data.url }, {
onSuccess: () => {
formik.resetForm()
setFile(undefined)
toast.success(t('wallet.successful_transfer'))
}
})
}
})
}