only use authorizedPayments for withdraw

This commit is contained in:
Barry Gitarts 2018-12-13 13:39:35 -05:00
parent 6b76e98e78
commit 214de820a2
2 changed files with 2 additions and 3 deletions

View File

@ -51,7 +51,7 @@ const TransferDialog = ({ row, handleClose, transferPledgeAmounts }) => (
setStatus, setStatus,
status status
}) => ( }) => (
<form onSubmit={handleSubmit}> <form onSubmit={handleSubmit} autoComplete="off">
<Dialog <Dialog
open={!!row} open={!!row}
onClose={handleClose} onClose={handleClose}
@ -70,7 +70,6 @@ const TransferDialog = ({ row, handleClose, transferPledgeAmounts }) => (
label="Amount to transfer" label="Amount to transfer"
placeholder="Amount to transfer" placeholder="Amount to transfer"
variant="outlined" variant="outlined"
type="number"
autoComplete="off" autoComplete="off"
fullWidth fullWidth
onChange={handleChange} onChange={handleChange}

View File

@ -65,7 +65,7 @@ class Withdraw extends PureComponent {
initialValues={{}} initialValues={{}}
onSubmit={async (values, { setSubmitting, resetForm, setStatus }) => { onSubmit={async (values, { setSubmitting, resetForm, setStatus }) => {
const { amount } = values const { amount } = values
const paymentId = authorizedPayments.find(r => r.ref === rowData.id)['idPayment'] const paymentId = isPaying ? authorizedPayments.find(r => r.ref === rowData.id)['idPayment'] : rowData.id
const args = isPaying ? [paymentId] : [paymentId, toWei(amount)] const args = isPaying ? [paymentId] : [paymentId, toWei(amount)]
const sendFn = isPaying ? confirmPayment : withdraw const sendFn = isPaying ? confirmPayment : withdraw
try { try {