Page MenuHomePhabricator

[Cashtab][Alias] Deprecate alias specific BlockConnected websocket events
ClosedPublic

Authored by emack on Jul 1 2023, 09:58.

Details

Summary

See T3216 for background

Cashtab no longer needs to cache aliases and alias tx histories, therefore there is no need for processChronikWsMsg to be listening on BlockConnected events to refresh local alias cache on new blocks.

There is currently no other uses for 'BlockConnected' events in Cashtab.

Test Plan

npm test
npm start
enable the aliasSettings.aliasEnabled flag in Ticker.js (will be moved in subsequent diff)
open console log and ensure no websocket errors upon new block found as the event should no longer be picked up
disable the aliasFlag, reload cashtab and ensure no websocket errors in console log upon startup

Diff Detail

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

Event Timeline

emack requested review of this revision.Jul 1 2023, 09:58

green with comment nit

cashtab/src/hooks/useWallet.js
868–869 ↗(On Diff #41158)
This revision is now accepted and ready to land.Jul 1 2023, 21:18
bytesofman requested changes to this revision.Jul 1 2023, 21:21
bytesofman added inline comments.
cashtab/src/hooks/__tests__/useWallet.test.js
30 ↗(On Diff #41158)

not sure this test proves anything?

looks like null would still be returned with the previous logic

This revision now requires changes to proceed.Jul 1 2023, 21:21
emack marked 2 inline comments as done.

Updated chronik websocket tests to specifically differentiate state between AddedToMempool and BlockConnected events

This revision is now accepted and ready to land.Jul 2 2023, 03:21