T2551
Depends on D13124
This diff mitigates the edge case of duplicate alias registration transactions by leveraging the approach used in D13115, achieved by setting unconfirmed txs to a block height of 100000000, sorting the txs by blockheight and txid, before filtering out subsequent instances of the same alias registration.
As part of testing, I have also validated it handles special characters and non-english languages. However depending on the language, the character counts evaluates differently as seen below.
german: Mädchen.xec <-- 7 characters, an extra one for the ä
korean: 소주.xec <-- 2 characters
chinese: 苦屎.xec <-- 2 characters
spanish: sandía.xec <-- 7 characters, an extra one for the í
arabic: محيط.xec <-- 4 characters
gibberish: ( ͡~ ͜ʖ ͡°).xec <-- 8 characters, 2 for each symbol with spaces stripped out
Based on above we can just let the existing char limit remain as is, since the char length is calculated at the point of determining the appropriate registration fee. When I hook it up to the send components in the next diff we'll need to test these thoroughly via the send inputs.
[Cashtab] [Alias] pt 1 - Create scaffold for new Identity component
[Cashtab] [Alias] pt 2 - Upgrade sendXec() to handle alias registration
[Cashtab] [Alias] pt 3 - Implement isAliasAvailable function
[Cashtab] [Alias] pt 4 - Implement isAddressRegistered function
[Cashtab] [Alias] pt 5 - Implement getAddressFromAlias function
[Cashtab] [Alias] pt 6.1 - Get latest alias tx count from payment address
[Cashtab] [Alias] pt 6.1.1 - Apply Promise.All approach for alias history retrieval
[Cashtab] [Alias] pt 6.2 - Implement getAliasesFromLocalForage
[Cashtab] [Alias] pt 6.3 - Implement updateAliases
[Cashtab] [Alias] pt 6.4 - Update getAliases() to extract both alias and address
[Cashtab] [Alias] pt 6.5 - Optimize getAllTxHistory to only make API calls for uncached tx history pages
[Cashtab] [Alias] pt 6.6 - Render list of Aliases owned by active wallet in Alias.js
[Cashtab] [Alias] pt 7 - Mitigate edge cases for registration records (same rego in same block, validate emoji char counts)
[Cashtab] [Alias] pt 8 - Enable alias lookup for Send XEC component
[Cashtab] [Alias] pt 9 - Enable alias lookup for Send Token component
[Cashtab] [Alias] pt 10 - Upgrade tx history to recognize alias registration txs
[Cashtab] [Alias] pt 11 - Set final registration fees and remove residual dev logs