Exemplo n.º 1
0
 def _on_text_changed(self):
     """ The contents of the text area have changed. """
     text = self.text_area.toPlainText().strip()
     new_text_matches = wallet_support.find_matching_text_import_types(text)
     if new_text_matches != self._text_matches:
         self._text_matches = new_text_matches
     self._label.setText(self._get_label_text())
Exemplo n.º 2
0
 def test_match_seed_word_types(self):
     for text in (SW_ESV_OLD, SW_ESV_NEW, SW_BIP39):
         matches = wallet_support.find_matching_text_import_types(text)
         self.assertEqual(matches,
                          {wallet_support.TextImportTypes.PRIVATE_KEY_SEED})
Exemplo n.º 3
0
 def test_match_nothing(self):
     matches = wallet_support.find_matching_text_import_types(SW_NOTHING)
     self.assertEqual(matches, set([]))
Exemplo n.º 4
0
 def test_match_minikey(self):
     matches = wallet_support.find_matching_text_import_types(TI_MINIKEY)
     self.assertEqual(matches,
                      {wallet_support.TextImportTypes.PRIVATE_KEY_MINIKEY})