-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactor account CLI commands and implementation #26
Conversation
739fcc3
to
c451c5c
Compare
c451c5c
to
f78058d
Compare
Codecov Report
@@ Coverage Diff @@
## develop #26 +/- ##
==========================================
- Coverage 98.98% 96.39% -2.6%
==========================================
Files 9 10 +1
Lines 99 111 +12
==========================================
+ Hits 98 107 +9
- Misses 1 4 +3
Continue to review full report at Codecov.
|
6b7a489
to
7e80de0
Compare
7e80de0
to
c9d82f2
Compare
balance = loop.run_until_complete(account_service.get_balance(address=address)) | ||
result, errors = Account(service=remme).get_balance(address=address) | ||
|
||
if errors is not None: |
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.
Why it's needed here, if Account(service=remme).get_balance(address=address)
always return error=None
.
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.
@Alladin9393, I think, In the future, we will have general exception cathing in every service. Could we leave it here although there are no errors for now?
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.
@dmytrostriletskyi, ok.
|
||
if re.match(pattern=DOMAIN_NAME_REGEXP, string=node_url) is None: | ||
raise ValidationError(f'The following node URL `{node_url}` is invalid.') | ||
address = AccountAddressField(required=True) |
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 an extra check.
address = AccountAddressField(required=True) | |
address = AccountAddressField(required=False) |
Because of click.
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.
@Alladin9393, imagine we will migrate this code from CLI to Web. Do we need to pay additional attention to how CLI handle arguments? No, we don't. We just need to cut the CLI. I mean forms do not know about the CLI.
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.
@dmytrostriletskyi, ok.
|
The following technical debt has been solved:
Install the package from the PypI through pip
>Install the package from the PyPi through pip