-
Notifications
You must be signed in to change notification settings - Fork 54
Conversation
} else if (investFlowStep == 2) { | ||
// Free claimings + selected investment oportunities | ||
const selectedIndex = [...getIndexes(freeClaims), ...selected] | ||
inputData = selectedIndex.reduce<EnhancedUserClaimData[]>((acc, idx: number) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i changed this into a reduce instead of a map + filter, because TS was giving me a hard time. It was thinking the array of clamings could contain undefined when i was filtering them...
reduce worked :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we break apart this fn?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
u mean the reduce? we could, but not sure it would add a lot of value.
if we had time, would be nice to cleanup things a bit, cause the logic still is a bit hard to follow
Could you please provide a preview link? |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worked great!
Tested the ETH claim flow https://rinkeby.etherscan.io/tx/0x6e04ae0a69d91f1888246554aec7d478ff14caa7c7ac252092f42eedcc4342aa
Summary
This PR connects the claiming investment to the investment flow.
To Test