Ejemplo n.º 1
0
 def on_empty_account_list():
     controller = App.get_running_app().root
     keystore_dir = controller.account_utils.keystore_dir
     title = "No account found"
     body = f"No account found in:\n{keystore_dir}"
     dialog = Dialog.create_dialog(title, body)
     dialog.open()
Ejemplo n.º 2
0
 def show_redirect_dialog(self):
     title = "Account created, redirecting..."
     body = ""
     body += "Your account was created, "
     body += "you will be redirected to the overview."
     dialog = Dialog.create_dialog(title, body)
     dialog.open()
Ejemplo n.º 3
0
 def dialog_roll_error(self, exception):
     """
     Shows different error message depending on the exception.
     On "MAC mismatch" (wrong password), void the cached password so the
     user can try again refs:
     https://github.com/AndreMiras/EtherollApp/issues/9
     """
     title = "Error rolling"
     body = str(exception)
     if body == 'MAC mismatch':
         title = "Wrong password"
         body = "Can't unlock wallet, wrong password."
         account = self.current_account
         self._account_passwords.pop(account.address.hex())
     dialog = Dialog.create_dialog(title, body)
     dialog.open()
Ejemplo n.º 4
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
Ejemplo n.º 5
0
 def on_connection_refused():
     title = 'No network'
     body = 'No network, could not retrieve roll history.'
     dialog = Dialog.create_dialog(title, body)
     dialog.open()
Ejemplo n.º 6
0
 def on_permission_error(exception):
     title = "Permission denied"
     body = str(exception.args)
     dialog = Dialog.create_dialog(title, body)
     dialog.open()
Ejemplo n.º 7
0
 def dialog_transaction_success(tx_hash):
     title = "Transaction successful"
     body = "Transaction hash:\n" + tx_hash.hex()
     dialog = Dialog.create_dialog(title, body)
     dialog.open()
Ejemplo n.º 8
0
 def dialog_roll_success(tx_hash):
     title = "Rolled successfully"
     body = "Transaction hash:\n" + tx_hash.hex()
     dialog = Dialog.create_dialog(title, body)
     dialog.open()
Ejemplo n.º 9
0
 def on_account_none():
     """Error dialog on no account selected."""
     title = "No account selected"
     body = "Please select an account before rolling"
     dialog = Dialog.create_dialog(title, body)
     dialog.open()
Ejemplo n.º 10
0
 def on_connection_refused():
     title = 'No network'
     body = 'No network, could not retrieve account balance.'
     dialog = Dialog.create_dialog(title, body)
     dialog.open()