Page MenuHomePhabricator

[Cashtab] [Alias] pt 17 - Enforce lowercase inputs
ClosedPublic

Authored by emack on Mar 7 2023, 23:58.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABC24565c8ca6d5: [Cashtab] [Alias] pt 17 - Enforce lowercase inputs
Summary

T2551

Have opted away from real time conversion of upper to lowercase inputs as the user may not spot it in long aliases. This diff uses regex to invalidate inputs with uppercase characters in the frontend.

[Cashtab] [Alias] pt 1 - Create scaffold for new Alias 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
[Cashtab] [Alias] pt 8 - Activation flag in prod
[Cashtab] [Alias] pt 9 - Retain tokenInfoById upon alias validation
--stacked diff cutoff--
[Cashtab] [Alias] pt 10 - Enable alias inputs for one to one Send XEC txs
[Cashtab] [Alias] pt 11 - Enable alias inputs for Send Token txs
[Cashtab] [Alias] pt 12 - Upgrade tx history to recognize alias registration txs
[Cashtab] [Alias] pt 13 -real time alias char length and registration fee display
[Cashtab] [Alias] pt 14 - Frontend bytesize validation
[Cashtab] [Alias] pt 15 - Reserved aliases
[Cashtab] [Alias] pt 16 - Resolve reserved aliases to aliasPaymentAddress
[Cashtab] [Alias] pt 17 - Enforce lowercase inputs
--closed beta--
[Cashtab] [Alias] pt 18 - Pre-prod update (add p2sh parsing, set final registration fees, remove residual dev logs, test in extension mode and enable prod flag)
[Cashtab] [Alias] pt 19 - Port Alias feature to Cashtab extension
--post mvp---
[Cashtab] [Alias] - Enable alias parsing without the .xec extension
[Cashtab] [Alias] - Optimize isAliasAvailable to take cached tx history as input
[Cashtab] [Alias] - Add active wallet's aliases to caching mechanism
[Cashtab] [Alias] - Resolve special characters processing in node app

Test Plan
  • enable alias feature in ticker.js
  • npm start
  • Use an alias with the first character capitalized and ensure the Uppercase characters are not permitted error is displayed and the Register Alias button disabled
  • Use an alias with a capitalized character in the middle of the string and ensure the same error is displayed
  • Ensure no regression with the 21 byte limit validation in the front end
  • Test with an emoji and ensure it is accepted
  • Test with a non-english language and ensure it is accepted
  • Test with special character (e.g. ( ͡°╭͜ʖ╮° )) and ensure it is accepted

Diff Detail

Repository
rABC Bitcoin ABC
Branch
lowercaseOnly
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 22288
Build 44205: Build Diffcashtab-tests
Build 44204: arc lint + arc unit