-
Notifications
You must be signed in to change notification settings - Fork 54
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.
Not necessarily from this PR, but this message can be confusing if you check your wallet because you claimed or it expired.
Should we broaden the message and take the two expiration dates into account?
EDIT: with " and take the two expiration dates into account" I'm refering to show some additional something when the investment opportunity is done.
If we want to be very specific useUserAvailableClaims
could return instead of the array of claims, also 2 flags: hasExpiredClaims
, claimedAmount
claimedAmount
seems like convenient to show in situation of partial claims and completed claims where you see the message above.
In the interest of time we decided to treat all options (no claim available, already claimed and expired claim) the same way.
This is turning the hook more complex than initially planned. In that case, I proposed the following interface change:
type Return = {
availableClaims: UserClaims
expiredClaims: UserClaims
claimedClaims: UserClaims // hmm not the best name
} This way the consumer can subscribe to whatever claim category it's interested on. What do you think? @gnosis/gp-frontend |
I like the proposal. And people can just ignore the arrays that they don’t need What about: type Return = {
available: UserClaims
expired: UserClaims
claimed: UserClaims
} |
Summary
Shorter PR this time :)
Excluding the expired claim from hook
useUserAvailableClaims
response.It's still possible to trigger the old behaviour by passing a flag to the hook.
To Test
The PAID claims should not be displayed as in the current state of the contract they are expired
Background
Optional: Give background information for changes you've made, that might be difficult to explain via comments