def request_seed(self, title, is_valid=None): is_valid = is_valid or Wallet.is_any slayout = SeedInputLayout() def sanitized_seed(): return clean_text(slayout.seed_edit()) def set_enabled(): self.next_button.setEnabled(is_valid(sanitized_seed())) slayout.seed_edit().textChanged.connect(set_enabled) self.set_main_layout(slayout.layout(), title, next_enabled=False) return sanitized_seed()
def text_input(self, title, message, is_valid): slayout = SeedInputLayout(title=message) def sanitized_seed(): return clean_text(slayout.seed_edit()) def set_enabled(): self.next_button.setEnabled(is_valid(sanitized_seed())) slayout.seed_edit().textChanged.connect(set_enabled) self.set_main_layout(slayout.layout(), title, next_enabled=False) seed = sanitized_seed() return seed
def text_input(self, title, message, is_valid): slayout = SeedInputLayout(title=message) def sanitized_seed(): return clean_text(slayout.seed_edit()) def set_enabled(): self.next_button.setEnabled(is_valid(sanitized_seed())) slayout.seed_edit().textChanged.connect(set_enabled) self.set_main_layout(slayout.layout(), title, next_enabled=False) seed = sanitized_seed() return seed
def request_seed(self, title, is_valid=None): is_valid = is_valid or Wallet.is_any slayout = SeedInputLayout() def sanitized_seed(): return clean_text(slayout.seed_edit()) def set_enabled(): self.next_button.setEnabled(is_valid(sanitized_seed())) slayout.seed_edit().textChanged.connect(set_enabled) self.set_main_layout(slayout.layout(), title, next_enabled=False) return sanitized_seed()