parent
26f7c2bda6
commit
c0423b10e0
|
@ -169,11 +169,11 @@ const getSendFn = (pledgeType, filteredPledges) => {
|
|||
const getArgs = (pledgeType, filteredPledges) => {
|
||||
if (pledgeTypes[pledgeType] === PLEDGED) {
|
||||
const formattedPledges = filteredPledges.map(pledge => ({ amount: pledge.amount, id: pledge.idPledge }))
|
||||
const encodedPledges = encodePledges(formattedPledges)
|
||||
const withdrawArgs = [filteredPledges[0].id, filteredPledges[0].amount]
|
||||
return filteredPledges.length > 1 ? [encodedPledges] : withdrawArgs
|
||||
if (filteredPledges.length > 1) return [encodePledges(formattedPledges)]
|
||||
const withdrawArgs = [formattedPledges[0].id, formattedPledges[0].amount]
|
||||
return withdrawArgs
|
||||
}
|
||||
const { idPayment } = filteredPledges[0].authorization.returnValues
|
||||
const { idPayment } = filteredPledges.filter(p => !!p)[0].authorization.returnValues
|
||||
return [idPayment]
|
||||
}
|
||||
const SubmissionSection = ({ classes, openSnackBar, syncWithRemote, pledges, pledgeType }) => {
|
||||
|
|
Loading…
Reference in New Issue