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()
def on_empty_account_list(): controller = App.get_running_app().root keystore_dir = controller.account_utils.keystore_dir title = "No account found" body = "No account found in:\n%s" % keystore_dir dialog = Dialog.create_dialog(title, body) dialog.open()
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()
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 exception.args[0] == '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()
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
def on_connection_refused(): title = 'No network' body = 'No network, could not retrieve roll history.' dialog = Dialog.create_dialog(title, body) dialog.open()
def dialog_roll_success(tx_hash): title = "Rolled successfully" body = "Transaction hash:\n" + tx_hash.hex() dialog = Dialog.create_dialog(title, body) dialog.open()
def on_connection_refused(): title = 'No network' body = 'No network, could not retrieve account balance.' dialog = Dialog.create_dialog(title, body) dialog.open()