[electrum] support eCash aliases in the "Pay To" field
Summary:
Support eCash aliases in the "Pay To" field, with the same limitations as OpenAliases:
- the resolving of the alias blocks the GUI for a couple of seconds
- only one recipient is supported when using aliases (no "pay to many")
eCash aliases require a .xec suffix in the send tab to be recognized.
Partially fix how resolved aliases are added to the Contacts:
- deduplicate self.win.contacts.add( line
- save eCash aliases with an address rather than the original alias (we assume immutability, for phase 1)
- update autcompletions immediately, rather than on the next restart
OpenAliases are not immutable, the address can be changes, which is probably why the URL was saved in the Contact's "address" field to avoid saving an address that could potentially become stale. But that means the autocompletion will not provide a string that is usable by the Send tab. Let's not add OpenAliases to the contacts, because right now the support is broken. OpenAliases are still usable in the PayTo field, they are just not saved to the wallet's contacts.
Depends on D14544
ref T3298
Test Plan:
./electrum-abc --enable-aliases
Prepare a transaction to "twelvechar12.xec", check the transaction is a valid transaction to an actual eCash address.
Check that "twelvechar12" has been added to the Contacts tab, and that the next time it is typed in the send form there is autocompletion provided.
Reviewers: #bitcoin_abc, Fabien, bytesofman
Reviewed By: #bitcoin_abc, Fabien, bytesofman
Subscribers: Fabien
Maniphest Tasks: T3298
Differential Revision: https://reviews.bitcoinabc.org/D14547