-
Notifications
You must be signed in to change notification settings - Fork 54
Conversation
CLA Assistant Lite All Contributors have signed the CLA. |
|
@@ -53,7 +69,7 @@ export function ClaimSummaryView({ showClaimText, totalAvailableText, totalAvail | |||
</Trans> | |||
</ClaimSummaryTitle> | |||
)} | |||
{totalAvailableAmount && ( | |||
{totalAvailableAmount && activeClaimAccount && ( |
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 don't think you need this here, since the amount is only used as a flag.
You can control this in the parent component, as you already do.
I think it'll work the same without this extra parameter. Doesn't it?
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.
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.
Alright then
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.
LGTM
if (!hasClaimSummary) return null | ||
if (!hasClaimSummary || !vCow) return null | ||
|
||
let totalAvailableAmount: CurrencyAmount<Token> | undefined = CurrencyAmount.fromRawAmount(vCow, JSBI.BigInt(0)) |
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.
This is now set to CurrencyAmount object by default because we want to show zero in this case and so that formatSmartLocaleAware
and formatMax
work
Summary
Fixes #2419
This scenario happens when there are no claimed or available claims but there is vCow balance, which means that user somehow has vCow balance but he didn't claim anything. So this probably shouldn't happen on Mainet or Gnosis Chain but happens on Rinkeby on accounts where you have vCow tokens from previous vCow contract deployments.