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

Correctly handle ENS name input for Role members #2366

Merged
merged 2 commits into from
Sep 24, 2024
Merged

Conversation

adamgall
Copy link
Member

Fixes #2341

It used to be that entering an ENS name into the "Member" field for a new role and clicking "Save" would crash the app.

The crash was happening in the Roles table. The "member" column was expecting the input string field to be an address, and we were doing getAddress() on it. This crashed when the input was actually an ENS name.

This PR fixes that Member column to properly handle any string (namely, ENS strings), by attempting to resolve them first.

Copy link

netlify bot commented Sep 23, 2024

Deploy Preview for decent-interface-dev ready!

Name Link
🔨 Latest commit 87f7314
🔍 Latest deploy log https://app.netlify.com/sites/decent-interface-dev/deploys/66f2bec00d20d30008c26621
😎 Deploy Preview https://deploy-preview-2366.app.dev.decentdao.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@mudrila mudrila left a comment

Choose a reason for hiding this comment

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

Looks good - just one minor suggestion about better variable naming or leveraging destructuring

src/components/pages/Roles/RolesTable.tsx Outdated Show resolved Hide resolved
src/components/pages/Roles/RolesTable.tsx Outdated Show resolved Hide resolved
src/components/pages/Roles/RolesTable.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@DarksightKellar DarksightKellar left a comment

Choose a reason for hiding this comment

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

LGTM!

@adamgall adamgall merged commit b704121 into develop Sep 24, 2024
7 checks passed
@adamgall adamgall deleted the ens-for-role-member branch September 24, 2024 17:12
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.

App crashes when typing ENS name into New Role member input field and clicking "Save"
3 participants