-
Notifications
You must be signed in to change notification settings - Fork 987
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
fix: handle unknown contract community #20198
Conversation
Jenkins BuildsClick to see older builds (19)
|
cef39ae
to
e31af78
Compare
CleanShot.2024-05-28.at.15.59.03.2.mp4 |
e31af78
to
8f57588
Compare
@@ -84,7 +83,9 @@ | |||
(local-notifications/process cofx (transforms/js->clj event-js)) | |||
|
|||
"community.found" | |||
(link-preview/cache-community-preview-data (transforms/js->clj event-js)) | |||
(let [community (transforms/js->clj event-js)] | |||
{:fx [[:dispatch [:chat.ui/cache-link-preview-data-by-community community]] |
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.
why do we use dispatch here?
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.
cache-link-preview-data
fx should be used directly here
@@ -19,6 +19,10 @@ | |||
data)))] | |||
{:db (assoc-in db [:profile/profile :link-previews-cache] link-previews-cache)}))) | |||
|
|||
(rf/reg-event-fx :chat.ui/cache-link-preview-data-by-community | |||
(fn [_ [community]] | |||
{:fx [[:dispatch [:chat.ui/cache-link-preview-data (community-link (:id community)) community]]]})) |
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.
why double dispatch is needed?
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.
Thanks for the PR description and adding tests @yqrashawn.
Except for the things @flexsurfer already commented, I'm approving in advance because the code LGTM.
I
426f264
to
0e8186e
Compare
Thanks for the review, I've addressed your feedback. @flexsurfer |
41% of end-end tests have passed
Not executed tests (1)Failed tests (26)Click to expandClass TestCommunityOneDeviceMerged:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestActivityMultipleDevicePR:
Class TestWalletMultipleDevice:
Class TestActivityMultipleDevicePRTwo:
Class TestDeepLinksOneDevice:
Class TestCommunityMultipleDeviceMerged:
Class TestActivityCenterContactRequestMultipleDevicePR:
Expected to fail tests (4)Click to expandClass TestCommunityOneDeviceMerged:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestWalletOneDevice:
Passed tests (21)Click to expandClass TestCommunityOneDeviceMerged:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestWalletOneDevice:
|
0e8186e
to
c059f63
Compare
(link-preview/cache-community-preview-data (transforms/js->clj event-js)) | ||
(let [community (transforms/js->clj event-js)] | ||
(link-preview/cache-community-preview-data community) | ||
(rf/dispatch [:discover-community/maybe-found-unknown-contract-community community])) |
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.
if we still want to use dispatch it should be :fx :dispatch
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.
I've updated the code, do you mean like this?
Signed-off-by: yqrashawn <namy.19@gmail.com>
c059f63
to
0d76176
Compare
55% of end-end tests have passed
Not executed tests (1)Failed tests (19)Click to expandClass TestWalletOneDevice:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestCommunityMultipleDeviceMerged:
Class TestDeepLinksOneDevice:
Class TestActivityMultipleDevicePRTwo:
Class TestWalletMultipleDevice:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityCenterContactRequestMultipleDevicePR:
Expected to fail tests (4)Click to expandClass TestCommunityOneDeviceMerged:
Class TestWalletOneDevice:
Class TestGroupChatMultipleDeviceMergedNewUI:
Passed tests (28)Click to expandClass TestCommunityMultipleDeviceMergedTwo:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestCommunityMultipleDeviceMerged:
Class TestDeepLinksOneDevice:
Class TestActivityMultipleDevicePRTwo:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityOneDeviceMerged:
Class TestActivityMultipleDevicePR:
Class TestActivityCenterContactRequestMultipleDevicePR:
|
(link-preview/cache-community-preview-data (transforms/js->clj event-js)) | ||
(let [community (transforms/js->clj event-js)] | ||
(link-preview/cache-community-preview-data community) | ||
{:fx [[:dispatch [:discover-community/maybe-found-unknown-contract-community community]]]}) |
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.
sorry for the confusion, here you have to dispatch cache-community-preview-data
as well as it was in the first iteration of your PR.
@yqrashawn thanks for the PR! Failed e2e are not PR related. Ready for merge and cherrypick into release branch cc @jo-mut |
fixes #20092
Summary
status-go give mobile this discover community list looks like this
we save it into db like this, discover community view will stay loading forever since there's only one community in the list and it's unknown
this PR save the unknown communities into db and update them into
featured
orother
once their"community.found"
signal receivedTesting notes
endpoint xxxxxx has passed its daily relay limit
on mainnet (in geth.log), this prevents status-go fetching the list as well, which leads to infinite loadingPOKT_TOKEN
to a newly created one, not sure if PR/nightly build uses different tokenPlatforms
Areas that maybe impacted
discover community
Steps to test
status: ready