-
Notifications
You must be signed in to change notification settings - Fork 91
feat: Show not found name when trying to see unexisting or not owned name #3342
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
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Pull Request Test Coverage Report for Build 21902527070Details
💛 - Coveralls |
RocioCM
left a comment
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.
Works perfect when the name doen't exist, but should we handle the case where the name exists but you are not the owner?
Screen.Recording.2026-02-10.at.10.02.18.AM.mov
src/modules/ens/selectors.ts
Outdated
| export const getFetchNameError = (state: RootState) => getState(state).fetchNameError | ||
|
|
||
| export const getFetchNameErrorMessage = (state: RootState) => { | ||
| const error = getFetchNameError(state) | ||
| if (error) { | ||
| return error.message | ||
| } | ||
|
|
||
| return null | ||
| } |
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.
getFetch... sounds weird. maybe we can just change the prop in the slice to something simpler so this getter is easier to name 🚀
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.
renamed to ensError
…ot belong to them
| ) : null} | ||
| </span> | ||
| <LoggedInDetailPage activeTab={NavigationTab.NAMES} isPageFullscreen={true} isLoading={isLoading}> | ||
| {!isLoading && error ? ( |
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.
| {!isLoading && error ? ( | |
| {!isLoading && (error || !ens) ? ( |
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.
there's a validation 2 lines down to check that there's an ens before showing the info. If I add that validation there, it creates a glitch on the UI because ens is undefined at the beggining
ui.bug.mov
src/modules/ens/reducer.ts
Outdated
| ...state, | ||
| loading: loadingReducer(state.loading, action), | ||
| error: { ...action.payload.error }, | ||
| fetchNameError: { ...action.payload.error } |
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 think you can continue using error for this case
| fetchNameError: { ...action.payload.error } |
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.
renamed to ensError
src/modules/ens/selectors.ts
Outdated
| export const getFetchNameError = (state: RootState) => getState(state).fetchNameError | ||
|
|
||
| export const getFetchNameErrorMessage = (state: RootState) => { | ||
| const error = getFetchNameError(state) | ||
| if (error) { | ||
| return error.message | ||
| } | ||
|
|
||
| return null | ||
| } |
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.
related to the reducer comment, I think you can continue using getErrorMessage
| export const getFetchNameError = (state: RootState) => getState(state).fetchNameError | |
| export const getFetchNameErrorMessage = (state: RootState) => { | |
| const error = getFetchNameError(state) | |
| if (error) { | |
| return error.message | |
| } | |
| return null | |
| } |
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.
renamed to ensError
| return { | ||
| ...state, | ||
| loading: loadingReducer(state.loading, action), | ||
| error: { ...action.payload.error }, |
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.
| error: { ...action.payload.error }, |
| case FETCH_ENS_REQUEST: { | ||
| return { | ||
| ...state, | ||
| error: null, |
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.
| error: null, |
ENS Infinite Loader Fix
Accessing non-existent ENS names showed infinite spinner instead of error message.
Changes
1. Redux State - Separate Error Field
src/modules/ens/reducer.tsfetchNameError: ENSError | nullto ENSStateFETCH_ENS_REQUESTclears botherrorandfetchNameErrorFETCH_ENS_FAILUREsets botherrorandfetchNameErrorerror, preservingfetchNameError2. Selectors - New Error Selector
src/modules/ens/selectors.ts3. Container - Use Isolated Error
4. Shared Empty State Component
src/components/ENSEmptyState/5. Tests
src/modules/ens/reducer.spec.tsvideo.mov
Screen.Recording.2026-02-11.at.11.30.47.mov