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

Read wallet password in bot instance, not main() #10

Merged
merged 10 commits into from
Jun 26, 2022

Conversation

ghubstan
Copy link
Owner

@ghubstan ghubstan commented Jun 26, 2022

  • Remove some duplicated code in the bots' main() methods.
  • Validate wallet password first.
  • Fix a bot config text alignment problem.
  • Print the day's BSQ swaps after each completed swap.

Based on PR #9 branch filter-gettrades-on-date.

ghubstan added 10 commits June 25, 2022 10:25
- When bot is run from a *nix terminal, password input will not be echoed.
- When bot is run from an IDE, it's virtual terminal will echo the input
  (cannot be avoided).

Validate the input during startup, to fail early instead of waiting for
the right offer to take, then failing to unlock the wallet with an
incorrect password.
Each bot has its own gRPC channel and set of service stubs,
and a single bot's channel & stubs last the bot's lifetime.
However, RegtestTradePaymentSimulator instance is a bot too, with it's
own channel & stubs, which should be closed at the end of each run().
Don't show entire trade history at end of bot run.

Tweak some log statements.
- Remove some duplicated code in the bots' main() methods.
- Validate wallet password first.
- Fix a bot config text alignment problem.
Copy link
Collaborator

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

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

utACK

@ripcurlx ripcurlx merged commit 0148f2a into main Jun 26, 2022
@ghubstan ghubstan deleted the parse-validate-args-before-password-prompt branch June 26, 2022 21:31
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.

2 participants