Page MenuHomePhabricator

[Cashtab] Standardize wallet refresh interval
ClosedPublic

Authored by emack on Jan 25 2024, 13:55.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABCd23ecd73498a: [Cashtab] Standardize wallet refresh interval
Summary

This diff standardizes the wallet refresh interval to 60 seconds.
Note: this is the fallback interval, as websocket events processed by processChronikWsMsg will still trigger instant refreshes.

The reasoning for moving away from basing fallback refresh intervals on websocket availability is because if there is no websocket then there is no chronik server either, so no need to distinguish between the two.

Test Plan

npm test

  • grep -r websocketConnectedRefreshInterval src/ with no output
  • npm start
  • open dev console and observe the Websocket connected, adjusting wallet refresh interval to 60s message upon initial load
  • send XEC to this wallet and ensure instant refresh

Diff Detail

Repository
rABC Bitcoin ABC
Branch
updateInterval
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26682
Build 52932: Build Diffcashtab-tests
Build 52931: arc lint + arc unit

Event Timeline

emack requested review of this revision.Jan 25 2024, 13:55
bytesofman added inline comments.
cashtab/src/hooks/useWallet.js
1539–1542 ↗(On Diff #44583)

Remove. We no longer want to be setting to the disconnected interval.

Here, we are just setting from websocketRefreshInterval to websocketRefreshInterval

This revision now requires changes to proceed.Jan 25 2024, 14:45
emack marked an inline comment as done.

Removed interval setting in activateWallet per feedback

simple diff so tempting to combine them but we are doing 2 things here

  1. get rid of the websocketDisconnectedRefreshInterval
  2. change existing interval

should be two diffs, in the above order

also version bump

This revision now requires changes to proceed.Jan 26 2024, 12:12

Rebased to D15296 and version bump

not sure about this in the test plan?

open dev console and observe the Websocket connected, adjusting wallet refresh interval to 60s messages and ensure they are appearing at 1 minute intervals

we should only see this once, on loading. are you seeing this every minute?

please update the test plan to confirm the websocket is not re-initializing every 60s. If this is happening, need a diff to fix.

This revision now requires changes to proceed.Jan 26 2024, 14:48
emack requested review of this revision.Jan 27 2024, 01:56
emack edited the test plan for this revision. (Show Details)
emack edited the test plan for this revision. (Show Details)

please update the test plan to confirm the websocket is not re-initializing every 60s. If this is happening, need a diff to fix.

It is indeed not re-initializing every 60s, only upon initial load. Test plan updated.

rebase + version bump before landing

This revision is now accepted and ready to land.Jan 27 2024, 15:26
This revision was landed with ongoing or failed builds.Jan 28 2024, 08:52
This revision was automatically updated to reflect the committed changes.