Skip to content
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

refactor: be optimistic to empty reverse result #10375

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

UncleBill
Copy link
Contributor

silence react-query's complaining about undefined result

MF-0000

silence react-query's complaining about undefined result
@UncleBill UncleBill added this to the 2.22.0 milestone Aug 13, 2023
@github-actions github-actions bot temporarily deployed to pull request August 13, 2023 05:34 Inactive
if (isBad) return
return NameService.reverse?.(address)
if (!address) return null
return NameService!.reverse!(address) || null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return NameService!.reverse!(address) || null
return NameService?.reverse?.(address) || null

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enabled: !!NameService?.reverse, makes sure it's not undefined.

@guanbinrui guanbinrui merged commit ded15fe into develop Aug 14, 2023
16 checks passed
@guanbinrui guanbinrui deleted the refactor/optimistic-reverse branch August 14, 2023 03:32
@UncleBill
Copy link
Contributor Author

It has reduced a lot of requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants