Page MenuHomePhabricator

[Cashtab] [Alias] pt 8 - Activation flag in prod
ClosedPublic

Authored by emack on Feb 17 2023, 22:56.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABC13d680f9dddd: [Cashtab] [Alias] pt 8 - Activation flag in prod
Summary

T2551

Depends on D13134

This diff adds a flag in Ticker.js which disables the Alias navigation and input UI by default. It also serves as the cutoff landing point in which part 9 onwards will be landed in a separate stacked diff to reduce overall stack size and rebasing complexities. Also added porting to the extension to the runsheet below.

[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
--cutoff--
[Cashtab] [Alias] pt 9 - Enable alias lookup for Send XEC component
[Cashtab] [Alias] pt 10 - Enable alias lookup for Send Token component
[Cashtab] [Alias] pt 11 - Upgrade tx history to recognize alias registration txs
[Cashtab] [Alias] pt 12 - Port Alias feature to Cashtab extension
[Cashtab] [Alias] pt 13 - Pre-prod update (Set final registration fees, remove residual dev logs and enable prod flag)

Test Plan
  • npm test
  • npm start
  • flag is false by default, hence ensure the hamburger menu shows no alias option and the user is unable to access it directly via http://localhost:3000/#/alias
  • change flag to true, and ensure the hamburger menu now shows the alias option and upon clicking on it the user is taken to the alias page with all inputs rendered
  • npm run extension and ensure it is similarly inaccessible in extension
  • ensure nothing else blows up in cashtab, especially navigating to other components since this is the main area that is touched by the production flag

Diff Detail

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

Event Timeline

emack requested review of this revision.Feb 17 2023, 22:56
  1. Remove changes to Alias.js, this conditional rendering is covered by clocking the <Route> component in App.js
  2. Add a comment at the top of the aliasSettings block in Ticker.js to clarify that these settings are for testing only
  3. Let's take the weekend to think about implication of landing this. For one, landing this diff will cause all Cashtab users to migrate to the new cashtabCache object. Are we sure that this is in a good structure? Not that big of a deal as we can always patch over it, main concern is making sure there isn't any significant technical debt incurred by putting this in prod.
web/cashtab/src/components/Alias/Alias.js
383 ↗(On Diff #37948)

since this is blocked at the route level in App.js, no need to also block it here.

This revision now requires changes to proceed.Feb 18 2023, 00:48
emack marked an inline comment as done.

Removed changes in Alias.js and added comments in Ticker.js

  1. Let's take the weekend to think about implication of landing this. For one, landing this diff will cause all Cashtab users to migrate to the new cashtabCache object. Are we sure that this is in a good structure? Not that big of a deal as we can always patch over it, main concern is making sure there isn't any significant technical debt incurred by putting this in prod.

T2936 comes to mind so we can potentially add it in as the new part 9 before landing 1-9. Other than that, since aliasCache is stored independently within cashtabCache, as long as the alias flag is set to false it won't affect the existing interactions with tokenInfoById.

Also is it worth removing all the debug logs before landing this first batch of stacked diffs?

okay lets do T2936 as part 9 and then land this

don't worry about the debug logs. in general, we should aim to get back into a cadence of landing diffs every day as soon as possible.

This revision is now accepted and ready to land.Feb 21 2023, 18:46