sheba cardtocard online
This commit is contained in:
@@ -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'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user