texts_cli.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. """A module with all the display info for whallets-cli."""
  2. from tabulate import tabulate
  3. import whallets_cli as cli
  4. def welcome_message():
  5. """welcoming message to the cli"""
  6. msg = \
  7. "WELCOME TO WHALLETS CLI"\
  8. "\n ========================================= \n"
  9. return msg
  10. def _main_menu():
  11. """Displays the CLI main menu"""
  12. line_0 = ("**","Enter the number from the menu:")
  13. line = ("---","------------------------------",)
  14. line_1 = ("1 -","Add a wallet to the the list")
  15. line_2 = ("2 -","Display the list of wallets")
  16. line_3 = ("3 -","Display recent whale TXs on your list")
  17. line_4 = ("
  18. table = []
  19. def _choose_chain():
  20. msg = \
  21. "\nPlease chose the network for the wallet address:"\
  22. "\n1 - EVM; Etherum main net and any forks (BSC, Poly..)"\
  23. "\n2 - SPL; Solana Program Platform"\
  24. "\n3 - BTC; Bitcoin"
  25. return msg
  26. def _prompt_address():
  27. """Ask or the wallet address"""
  28. msg = "\nEnter the wallet address:\n"
  29. return msg
  30. def _prompt_twitter():
  31. """Ask or the wallet address"""
  32. msg = "\nEnter the twitter link (full address):\n"
  33. return msg
  34. def _prompt_info():
  35. """Ask or the wallet address"""
  36. msg = "\nEnter short info about the user:\n"
  37. return msg
  38. def _prompt_name():
  39. """Ask or the wallet address"""
  40. msg = "\nEnter user/wallet name/tag:\n"
  41. return msg
  42. def _prompt_ens():
  43. """Ask or the wallet address"""
  44. msg = "\nEnter user's ENS:\n"
  45. return msg
  46. def _check_wallet_result(chain, name, addr, twtr, ens):
  47. """Messages informing about existing wallet"""
  48. ix = cli.check_wallet(chain, name, addr, twtr, ens)
  49. if ix < 4:
  50. items = ['name','address','twitter','ens']
  51. item = items[ix]
  52. msg = f"This {item} is already saved in the databse."
  53. else:
  54. msg = "New wallet was saved."
  55. return msg