예제 #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 = "No account found in:\n%s" % keystore_dir
     dialog = Dialog.create_dialog(title, body)
     dialog.open()
예제 #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()
예제 #3
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()
예제 #4
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()
예제 #5
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
예제 #6
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()
예제 #7
0
 def on_connection_refused():
     title = 'No network'
     body = 'No network, could not retrieve roll history.'
     dialog = Dialog.create_dialog(title, body)
     dialog.open()
예제 #8
0
 def on_connection_refused():
     title = 'No network'
     body = 'No network, could not retrieve account balance.'
     dialog = Dialog.create_dialog(title, body)
     dialog.open()
예제 #9
0
 def on_permission_error(exception):
     title = "Permission denied"
     body = str(exception.args)
     dialog = Dialog.create_dialog(title, body)
     dialog.open()