Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Claim investment #2191

Merged
merged 4 commits into from
Jan 18, 2022
Merged

Claim investment #2191

merged 4 commits into from
Jan 18, 2022

Conversation

anxolin
Copy link
Contributor

@anxolin anxolin commented Jan 18, 2022

Summary

This PR connects the claiming investment to the investment flow.

To Test

  1. You can use accounts:
  • 0xdB45e7913596C9dcd8Dca6D16F6616d4EbF647f1
  • 0xd72bfEceAA089601a7B14d3cc0A79c56553266eA
  • 0xD4612f0C63276B6859eB8030bfB80C1e677d0de9
  • 0xD3E09Fe5d2556443e4FEBd9bBc3DCaC0e54606E3
  • 0xd30544A41E10085093A65F8B7557b4ABbe0b3554
  1. The try to invest 100% of the GNO (you will need to approve first)

@anxolin anxolin requested review from a team January 18, 2022 14:25
@anxolin anxolin changed the base branch from develop to claim January 18, 2022 14:28
} else if (investFlowStep == 2) {
// Free claimings + selected investment oportunities
const selectedIndex = [...getIndexes(freeClaims), ...selected]
inputData = selectedIndex.reduce<EnhancedUserClaimData[]>((acc, idx: number) => {
Copy link
Contributor Author

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 :)

Copy link
Contributor

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?

Copy link
Contributor Author

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

@elena-zh
Copy link

Could you please provide a preview link?

@github-actions
Copy link
Contributor

  • 🔭 GP Swap: Gnosis Protocol v2 Swap UI

Copy link
Contributor

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants