Page MenuHomePhabricator

[Cashtab] [Alias] pt 15 - Reserved Aliases
ClosedPublic

Authored by emack on Mar 4 2023, 04:04.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABC854e677b45f2: [Cashtab] [Alias] pt 15 - Reserved Aliases
Summary

T2551

This is a standalone diff that adds a single source for a list of reserved aliases based on team trademarks and scam wallet mitigations.

[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
--closed beta--
[Cashtab] [Alias] pt 16 - 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 17 - 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 Aliases in Ticker.js
  • npm start
  • attempt to register an alias from the reserved list and observe the alias taken error
  • attempt to register an alias from the reserved list with capitalized variances and observe the alias taken error
  • attempt to register an alias not on the reserved list and ensure successful registration

Diff Detail

Repository
rABC Bitcoin ABC
Branch
reservedAliases
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 22262
Build 44159: Build Diffcashtab-tests
Build 44158: arc lint + arc unit

Event Timeline

emack requested review of this revision.Mar 4 2023, 04:04
bytesofman requested changes to this revision.Mar 4 2023, 18:24

Also need to modify the getAliasAndAddresses function so that user registrations of reserved aliases are not treated as valid.

web/cashtab/src/components/Alias/Alias.js
147 ↗(On Diff #38290)

typo isReservedAliase -> isReservedAlias

153 ↗(On Diff #38290)

typo isReservedAliase -> isReservedAlias

This revision now requires changes to proceed.Mar 4 2023, 18:24
emack marked 2 inline comments as done.

Updated getAliasAndAddresses to ignore reserved aliases. Tested by registering an unreserved alias, then adding it to the reserved list, followed by deleting cashtabCache and triggering a refresh of the alias cache. Ensure it does not appear in Alias.js' Registered Aliases list for the active wallet.

Also tested sending using this now-reserved address and it's correctly invalidated in Send.js

bytesofman requested changes to this revision.Mar 5 2023, 02:16
bytesofman added inline comments.
web/cashtab/src/components/Alias/Alias.js
145 ↗(On Diff #38296)

the isReservedAlias logic should be added to the isAliasAvailable function. otherwise we always need to remember to call both.

This revision now requires changes to proceed.Mar 5 2023, 02:16
emack marked an inline comment as done.

Moved the isReservedAlias logic into the isAliasAvailable function

Note -- the reserved aliases should resolve to aliasPaymentAddress. This can be handled in another diff.

image.png (144×474 px, 8 KB)

This revision is now accepted and ready to land.Mar 5 2023, 03:56
This revision was automatically updated to reflect the committed changes.