-
Notifications
You must be signed in to change notification settings - Fork 55
Conversation
|
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.
Glad you got what we were meaning with doing a hook that would wrap useUserEnhancedClaimData
return claims.reduce<typeof zeroVCow>((totalTokens, claim) => { | ||
const { price, currencyAmount } = claim | ||
// if claim is included in selected invest option | ||
if (selected.includes(claim.index)) { |
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.
What about free claims?
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.
Based on text and place, I assume this is only to show investment claims sum vCOW to receive based on selected investment(s):
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). 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. |
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.
Besides mentioned above issue, calculation itself works fine to me
@elena-zh Thank you Elena, should be fixed now. |
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.
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
Thank you, @nenadV91 ! |
Summary
Calculates and shows total amount of invested vCow on the InvestFlowStep 1