HomePhabricator

[electrum] add a new type of contact for ecash aliases

Description

[electrum] add a new type of contact for ecash aliases

Summary:
Note that this change will make wallet files containing the new type of contact incompatible with previous versions of Electrum ABC, because of the assertions that are now removed.
Depends on D14541

Test Plan:
Apply this patch

diff --git a/electrum/electrumabc_gui/qt/contact_list.py b/electrum/electrumabc_gui/qt/contact_list.py
index cdbd40d13a..a625b9cc3f 100644
--- a/electrum/electrumabc_gui/qt/contact_list.py
+++ b/electrum/electrumabc_gui/qt/contact_list.py
@@ -395,7 +395,7 @@ class ContactList(PrintError, MessageBoxMixin, MyTreeWidget):
             prefix = networks.net.CASHADDR_PREFIX.lower() + ":"
             if address.lower().startswith(prefix):
                 address = address[len(prefix) :]
-            self.set_contact(d.get_name(), address)
+            self.set_contact(d.get_name(), address, typ="ecash")

     def set_contact(
         self, label, address, typ="address", replace: Optional[Contact] = None

Add a new contact, check that it shows with the eCash logo and correct type in the Contacts tab.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D14542

Details

Provenance
PiRKAuthored on Sep 26 2023, 08:04
PiRKPushed on Sep 26 2023, 15:44
Reviewer
Restricted Project
Differential Revision
D14542: [electrum] add a new type of contact for ecash aliases
Parents
rABC03c99fe4cc4a: [lint] exclude icons.py from more linters
Branches
Unknown
Tags
Unknown