Page MenuHomePhabricator

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

Authored by PiRK on Sep 26 2023, 08:52.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCd3cab7ae6e46: [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.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Sep 26 2023, 08:52

This does not add support for aliases, only add the type which is unused ?

This does not add support for aliases, only add the type which is unused ?

Correct. I'm working on the actual support in D14544

This revision is now accepted and ready to land.Sep 26 2023, 14:45