Exemplo n.º 1
0
 def show_redirect_dialog(self):
     title = "Account deleted, redirecting..."
     body = ""
     body += "Your account was deleted, "
     body += "you will be redirected to the overview."
     dialog = Dialog.create_dialog(title, body)
     dialog.open()
Exemplo n.º 2
0
 def verify_amount_field(self):
     title = "Input error"
     body = "Invalid amount field"
     if self.send_amount == 0:
         dialog = Dialog.create_dialog(title, body)
         dialog.open()
         return False
     return True
Exemplo n.º 3
0
 def prompt_no_account_error(self):
     """
     Prompts an error since no account are selected for deletion, refs:
     https://github.com/AndreMiras/PyWallet/issues/90
     """
     title = "No account selected."
     body = "No account selected for deletion."
     dialog = Dialog.create_dialog(title, body)
     dialog.open()
Exemplo n.º 4
0
 def setup(self):
     self.controller = App.get_running_app().controller
     self.keystore_path = Settings.get_keystore_path()
     accounts = self.controller.pywalib.get_account_list()
     if len(accounts) == 0:
         title = "No keystore found."
         body = "Import or create one."
         dialog = Dialog.create_dialog(title, body)
         dialog.open()
Exemplo n.º 5
0
 def show_storage_permissions_required_dialog(self):
     title = "External storage permissions required"
     body = ""
     body += "In order to save your keystore, PyWallet requires access "
     body += "to your device storage. "
     body += "Please allow PyWallet to access it when prompted."
     dialog = Dialog.create_dialog(title, body)
     dialog.open()
     return dialog
Exemplo n.º 6
0
 def verify_to_address_field(self):
     title = "Input error"
     body = "Invalid address field"
     try:
         to_checksum_address(self.send_to_address)
     except ValueError:
         dialog = Dialog.create_dialog(title, body)
         dialog.open()
         return False
     return True
Exemplo n.º 7
0
 def try_unlock(account, password):
     """
     Just as a security measure, verifies we can unlock
     the newly created account with provided password.
     """
     # making sure it's locked first
     account.lock()
     try:
         account.unlock(password)
     except ValueError:
         title = "Unlock error"
         body = ""
         body += "Couldn't unlock your account.\n"
         body += "The issue should be reported."
         dialog = Dialog.create_dialog(title, body)
         dialog.open()
         return