-
Notifications
You must be signed in to change notification settings - Fork 18
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
Improve registry script usability #890
Conversation
Codecov Report
@@ Coverage Diff @@
## master #890 +/- ##
==========================================
+ Coverage 90.66% 90.72% +0.05%
==========================================
Files 41 41
Lines 2893 2986 +93
Branches 356 373 +17
==========================================
+ Hits 2623 2709 +86
- Misses 192 195 +3
- Partials 78 82 +4
Continue to review full report at Codecov.
|
src/raiden_libs/service_registry.py
Outdated
if web3.eth.chainId == 1: | ||
click.secho("You don't have sufficient tokens", err=True) | ||
sys.exit(1) |
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 understand the flow here:
a) where is the check that the user does not have "sufficient tokens"?
b) why don't we show the token amount the user has?
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 are completely right. I moved those lines around a few times too often and apparently mixed up the conditions the last time. Should be better, now.
deposits = [d for d in deposits if not d["withdrawn"]] | ||
if not deposits: | ||
click.echo("No deposits found!", err=True) | ||
sys.exit(1) |
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 finding withdrawable deposits does not necessarily constitute an error (exit > 0
) to me. Does it to you?
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 withdraw is called, I would expect a withdraw to happen. It feels similar to an rm
with a filename that does not exist to me. I do see your point, but prefer the current return code.
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, thanks!
This makes withdrawing a lot easier for the service operator.
Example output: ``` * block 2728455, amount: 1991640781850122022103 REI (1991.64 RDN), WITHDRAWN * block 3781847, amount: 10227217067851600044335 REI (10227.22 RDN), increased validity till 2021-05-18 15:34:32 ```
As requested in raiden-network#768.
I could not find a good document about our auction format. Otherwise, I would have linked to that.
f2f5c3b
to
cf714d4
Compare
The check was broken during the last refactoring.
cf714d4
to
8954566
Compare
A large collection of UI improvements for the service registration. Highlights:
withdraw
will find it for youCloses #768 and #490.