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

Add tip command #46

Merged
merged 9 commits into from
Dec 1, 2021
Merged

Add tip command #46

merged 9 commits into from
Dec 1, 2021

Conversation

oraclown
Copy link
Collaborator

Closes #43

Adds tip command.
Adds some telliot-examples CLI tests.

Example usage:

telliot-examples -lid 1 tip -trb 2
telliot-examples --legacy-id 59 tip --amount-trb .5

legacy_id is now a required arg to the CLI's context, which is used by both report and tip commands, so you gotta put it before report as well:

telliot-examples -lid 1 report

"""Tip TRB for a selected query ID"""
legacy_id = ctx.obj["LEGACY_ID"]

click.echo(f"Tipping {round(amount_trb, 2)} TRB for legacy ID {legacy_id}.")
Copy link
Contributor

Choose a reason for hiding this comment

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

suggest removing rounding to avoid confusion in logs. (test shows tip of 0, even when it is not)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point, done

@oraclown oraclown merged commit 73e7fd5 into main Dec 1, 2021
@oraclown oraclown deleted the tip-query-cmd branch December 3, 2021 13:45
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.

Add CLI command for tipping
2 participants