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()
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
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()
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()
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
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
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