use pledgeId instead of id

This commit is contained in:
Barry Gitarts 2019-01-25 15:26:30 -05:00
parent eb5d3a2e46
commit c5cd136e17
1 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ class Withdraw extends PureComponent {
initialValues={{}}
onSubmit={async (values, { setSubmitting, resetForm, setStatus }) => {
const { amount } = values
const paymentId = isPaying ? authorizedPayments.find(r => r.ref === rowData.id)['idPayment'] : rowData.id
const paymentId = isPaying ? authorizedPayments.find(r => r.ref === rowData.id)['idPayment'] : rowData.pledgeId
const args = isPaying ? [paymentId] : [paymentId, toWei(amount)]
const sendFn = isPaying ? confirmPayment : withdraw
try {
@ -102,7 +102,7 @@ class Withdraw extends PureComponent {
<Card className={classes.card} elevation={0}>
<CardContent>
<Typography variant="h6" component="h2">
{`${isPaying ? 'Confirm' : ''} Withdraw${isPaying ? 'al' : ''} ${values.amount || ''} ${values.amount ? getTokenLabel(rowData[6]) : ''} from Pledge ${rowData.id}`}
{`${isPaying ? 'Confirm' : ''} Withdraw${isPaying ? 'al' : ''} ${values.amount || ''} ${values.amount ? getTokenLabel(rowData[6]) : ''} from Pledge ${rowData.pledgeId}`}
</Typography>
{!isPaying && <TextField
className={classes.amount}