Depends on D12105
Details
Hardcoded userIDs from staging as the user store and confirmed aux user store was populated with fids on connecting farcaster account
Diffed up first without a full end to end test. Will not land until I verify that the aux user store is properly populated with fids for users in the User Store
Diff Detail
- Repository
- rCOMM Comm
- Branch
- farcaster/set_aux_user_fids
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
lib/components/farcaster-data-handler.react.js | ||
---|---|---|
110–133 | It doesn't seem like this logic is connected at all to the block you put it in. This makes the code more confusing, and it forces your logic to wait on the other logic to complete before being able to proceed. I think we should factor it out. What if we had a single effect that called two React.useCallbacks, each of which was responsible for one of these blocks of functionality? We should also probably move some of the checks on lines from 70 to 80 to the callbacks | |
116–122 | Shorthand | |
124–133 | Doing two dispatches in a row like this is an anti-pattern... do you think we could introduce a replaceAuxUserFIDsActionType? |
lib/components/farcaster-data-handler.react.js | ||
---|---|---|
124–133 | I agree with these suggestions. Will include a new action type in a separate diff and separate logic into two React.useCallbacks on next rebase |
lib/components/farcaster-data-handler.react.js | ||
---|---|---|
129–134 ↗ | (On Diff #40351) | I introduced a previous diff where setAuxUserFIDs now clears fids prior to updating with new fids from the payload. The previous functionality of setAuxUserFIDs of just adding without clearing is now a new action type addAuxUserFIDs There are now two callbacks which are called by a single useEffect. The two callbacks are called handleFarcasterMutuals and handleUserStoreFIDs |
lib/components/farcaster-data-handler.react.js | ||
---|---|---|
142–145 ↗ | (On Diff #40351) |
|