From 214de820a2ebd215d19ad5d7435bad1674ffecbd Mon Sep 17 00:00:00 2001 From: Barry Gitarts Date: Thu, 13 Dec 2018 13:39:35 -0500 Subject: [PATCH] only use authorizedPayments for withdraw --- app/components/TransferDialog.jsx | 3 +-- app/components/table/WithdrawCard.jsx | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/components/TransferDialog.jsx b/app/components/TransferDialog.jsx index f95c287..72fbe27 100644 --- a/app/components/TransferDialog.jsx +++ b/app/components/TransferDialog.jsx @@ -51,7 +51,7 @@ const TransferDialog = ({ row, handleClose, transferPledgeAmounts }) => ( setStatus, status }) => ( -
+ ( label="Amount to transfer" placeholder="Amount to transfer" variant="outlined" - type="number" autoComplete="off" fullWidth onChange={handleChange} diff --git a/app/components/table/WithdrawCard.jsx b/app/components/table/WithdrawCard.jsx index b636e51..3c90bf5 100644 --- a/app/components/table/WithdrawCard.jsx +++ b/app/components/table/WithdrawCard.jsx @@ -65,7 +65,7 @@ class Withdraw extends PureComponent { initialValues={{}} onSubmit={async (values, { setSubmitting, resetForm, setStatus }) => { 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 sendFn = isPaying ? confirmPayment : withdraw try {