Skip to content
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

Send all funds on payout #153

Merged
merged 12 commits into from
Dec 22, 2020
Merged

Send all funds on payout #153

merged 12 commits into from
Dec 22, 2020

Conversation

MakMuftic
Copy link
Member

@MakMuftic MakMuftic commented Dec 16, 2020

Enable sending the entire balance of address as reward

PR Checklist

  • I have run linter locally
  • I have run unit and integration tests locally
  • Rebased to master branch / merged master
  • Updated CHANGELOG.md

Changes

  • add new flag to payout and start command for address on which lb fee will be sent
  • refactor payout distribution function to support separate address for loadbalancer fee
  • refactor payout function to support sending entire balance of address if reward amount not defined
  • ADDITIONAL validate flags so it is not possible to set automatic (entire balance) reward without providing a separate address for lb fees
  • ADDITIONAL add prompt for the user to confirm the address for lb fees if the entire balance is going to be sent as a reward

Issues

Closes #141

@MakMuftic MakMuftic marked this pull request as ready for review December 16, 2020 07:38
@MakMuftic
Copy link
Member Author

@mpetrun5 you can review this code, but we shouldn't merge this yet as I need to do some additional manual testing to be on the safe side.

Copy link
Member

@mpetrunic mpetrunic left a comment

Choose a reason for hiding this comment

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

I'm a bit scared of this actually haha. I guess we should:

  • add confirmation that user is sure that it wan't to payout everything
  • maybe when starting give big fat warning if lb payout address is same as lb tresury address or maybe don't let it start with that config?

@MakMuftic
Copy link
Member Author

@mpetrun5 @mpetrunic If the user wants the entire balance to be treated as reward then an additional address for lb fees must be provided. Additionally, the user is prompted to confirm this external address once more as seen in the example below

Example

Prompt example:

image

@mpetrunic
Copy link
Member

@mpetrun5 @mpetrunic If the user wants the entire balance to be treated as reward then an additional address for lb fees must be provided. Additionally, the user is prompted to confirm this external address once more as seen in the example below

Example

Prompt example:

image

Keep in mind we shouldn't have prompt on starting of load balancer (it would make it unusable to be run as service)

@MakMuftic
Copy link
Member Author

@mpetrun5 @mpetrunic If the user wants the entire balance to be treated as reward then an additional address for lb fees must be provided. Additionally, the user is prompted to confirm this external address once more as seen in the example below

Example

Prompt example:
image

Keep in mind we shouldn't have prompt on starting of load balancer (it would make it unusable to be run as service)

Now prompt is only shown on the manual payout, not on starting LB

@MakMuftic MakMuftic requested a review from mpetrunic December 21, 2020 12:08
@mpetrunic mpetrunic merged commit 90c80aa into master Dec 22, 2020
@mpetrunic mpetrunic deleted the mmuftic/send-all-funds-on-payout branch December 22, 2020 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support sending all funds from lb account on payout
3 participants