not finding delegates pledges
This commit is contained in:
parent
addd5116e5
commit
0331f53c18
|
@ -38,7 +38,7 @@ const batchAddDelegates = async (pledges, profiles, existing) => {
|
|||
pledges.forEach(pledge => {
|
||||
const { delegates } = pledge
|
||||
delegates.forEach((delegateInfo, idx) => {
|
||||
const profile = profiles.find(p => p.idProfile === delegateInfo.idDelegate)
|
||||
const profile = profiles.find(p => p.idProfile === Number(delegateInfo.idDelegate))
|
||||
const exists = delegateRecordExists(profile, pledge, idx+1, existing)
|
||||
if (!exists) {
|
||||
batch.push(
|
||||
|
|
|
@ -101,7 +101,6 @@ const SubmissionSection = ({ classes, profiles, delegatePledges, projectId, open
|
|||
const filteredPledges = values.delegateProfile ? delegatePledges.filter(
|
||||
d => d.profile.id === values.delegateProfile.id && d.pledgeData.amount !== '0' && d.pledgeData.pledgeState === 0 && d.pledgeData.intendedProject === 0
|
||||
) : null
|
||||
console.log({filteredPledges})
|
||||
return (
|
||||
<form onSubmit={handleSubmit} className={classes.submissionRoot}>
|
||||
{profiles && profiles.length === 0 &&
|
||||
|
|
Loading…
Reference in New Issue