-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
colw/2637 withdraw from 1-5 validators at a time #2647
Conversation
- Add address to `withdrawAllRewards` action If present, add array of single validator address else use all validators with rewards - Add button below delegation / undelegation validator section - Create new Modal for single withdrawal. Streamlined from multiple variant
type: String, | ||
required: true | ||
}, | ||
rewards: { |
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.
Thinking about the ActionModal webcomponent, does it make sense to make the rewards an input? Or would we wrap this in a controller?
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.
Yep, I thought about this. I believe wrapping any future ActionModal web component in a controller is better.
IMHO, the Modals should be 'dumb' views, and at most receive data and forward user actions, but that's it. Separation of concerns.
Note: We should incrementally move all views to this approach.
- Remove some cruft
- Keep data conversions out of the modal - Clean withdraw all modal - Replace WithdrawAll modal with singular modal
Remove mapActions in favour so of calling $store directly.
<span class="input-suffix">{{ denom | viewDenom }}</span> | ||
<TmField id="amount" :value="rewards | atoms | fullDecimals" readonly /> | ||
</TmFormGroup> | ||
<span v-if="!validatorAddress" class="form-message"> |
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.
should the message show always or only when the user actually has more then 5 delegations?
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.
🤦♂ You're right!
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.
Actually, is it necessary? We could leave it there to inform the user regardless?
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 personally like to reduce noise that is not important to users. @jbibla preferences?
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.
- It could have a minor impact on the message wording. The current phrasing is generic.
) { | ||
const top5Delegations = getTop5Delegations(getters.committedDelegations) |
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.
should only limit to 5 delegations if the user is using the Ledger Nano S, but we can figure this out once we have more signers
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.
Indeed. There's some time to spare before the Nano X is in wide distribution, and we'll need to detect the difference. Is that right?
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.
yep
d1180af
to
0ddf8a1
Compare
Closes #2637
Description:
Withdraw in one of two ways:
If there are no rewards from a given validator, the button is disabled:

The modal supports both variations and displays a message when withdrawing globally.

Message:
Note: Lunie withdraws only the top 5 rewards at a time.
Thank you! 🚀
For contributor:
yarn changelog
for a guided process.Files changed
in the github PR explorerFor reviewer: