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

Show total invested vCow amount #2223

Closed
wants to merge 4 commits into from
Closed

Show total invested vCow amount #2223

wants to merge 4 commits into from

Conversation

nenadV91
Copy link
Contributor

Summary

Calculates and shows total amount of invested vCow on the InvestFlowStep 1
Screenshot from 2022-01-19 19-59-31

@nenadV91 nenadV91 requested review from a team January 19, 2022 19:03
@github-actions
Copy link
Contributor

  • 🔭 GP Swap: Gnosis Protocol v2 Swap UI

Copy link
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

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

Glad you got what we were meaning with doing a hook that would wrap useUserEnhancedClaimData

src/custom/state/claim/hooks/index.ts Outdated Show resolved Hide resolved
src/custom/state/claim/hooks/index.ts Outdated Show resolved Hide resolved
src/custom/state/claim/hooks/index.ts Outdated Show resolved Hide resolved
src/custom/state/claim/hooks/index.ts Outdated Show resolved Hide resolved
@nenadV91 nenadV91 requested a review from anxolin January 19, 2022 20:34
return claims.reduce<typeof zeroVCow>((totalTokens, claim) => {
const { price, currencyAmount } = claim
// if claim is included in selected invest option
if (selected.includes(claim.index)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What about free claims?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on text and place, I assume this is only to show investment claims sum vCOW to receive based on selected investment(s):

@alfetopito
Copy link
Contributor

alfetopito commented Jan 20, 2022

While implementing #2227 I think this is no longer relevant.

If we take the route we discussed on Figma, we won't show this value on the allowances page (without the free claims).
Instead we'll show it on the review page, where all the data is already present.
Will just need to sum it up there directly, so this hook will be redundant.

Effort not wasted though, as I did use this PR as reference for my changes.

Let's discuss with the team tomorrow to make a decision.

@elena-zh
Copy link

I get a hard error when try to open the Claim page as a not connected user/connected to Mainnet/xDAI user
image.
When I'm connected to Rinkeby, I can open the Claim page

Copy link

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

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

Besides mentioned above issue, calculation itself works fine to me

@nenadV91
Copy link
Contributor Author

@elena-zh Thank you Elena, should be fixed now.

Copy link
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

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

If we take the route we discussed on Figma, we won't show this value on the allowances page (without the free claims).
Instead we'll show it on the review page, where all the data is already present.
Will just need to sum it up there directly, so this hook will be redundant.

Yes, this is also what we discussed in the last sync. I tried to suggest this in my doc of outstanding things and this message https://gnosisinc.slack.com/archives/C025G521XQD/p1642549623080200

Happy to remove the totals in the approvals page

@elena-zh
Copy link

Thank you, @nenadV91 !
The claim page is displayed now when I open it as a not connected user/user connect to Mainnet/xdai

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