-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Actually fix follow artists step in sign up flow C-3206 #6312
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -498,6 +498,7 @@ function* signUp() { | |
yield put(signOnActions.signUpSucceeded()) | ||
yield put(signOnActions.sendWelcomeEmail(name)) | ||
yield call(fetchAccountAsync, { isSignUp: true }) | ||
yield put(signOnActions.followArtists()) | ||
}, | ||
function* ({ timeout }) { | ||
if (timeout) { | ||
|
@@ -739,14 +740,7 @@ function* watchConfigureMetaMask() { | |
} | ||
|
||
function* watchFollowArtists() { | ||
while ( | ||
yield all([ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This while(yield) thing was a killer. If you were signed into an account when you started the session, then the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Simplified this by just having it take that one action and dispatching it when we actually want it to go. |
||
take(accountActions.fetchAccountSucceeded.type), | ||
take(signOnActions.FOLLOW_ARTISTS) | ||
]) | ||
) { | ||
yield call(followArtists) | ||
} | ||
yield takeLatest(signOnActions.FOLLOW_ARTISTS, followArtists) | ||
} | ||
|
||
function* watchShowToast() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we kept this here, but just changed the takeLatest like you did? I don't have the full picture but it seemed the issue was the saga not getting triggered, not an issue with dispatching followArtists?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just left another comment, we can't do
followArtists
until the account is created, fetched, and populated in the store. That's what the saga in the other file intended to do (by also waiting onfetchAccountSucceeded
) but failed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah makes sense, thanks