Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

feat: Add ENS Reverse Lookup to Create/Load Safe process #3262

Merged
merged 25 commits into from
Jan 21, 2022

Conversation

usame-algan
Copy link
Member

@usame-algan usame-algan commented Jan 10, 2022

What it solves

Resolves #3231

How this PR fixes it

We do ENS Lookups for Owners when loading and creating a safe and use the return value for the owner input fields

How to test it

Load Safe

  • Open the Safe App
  • Load existing Safe that has an owner with registered ENS name

Create Safe

  • Open the Safe App
  • Connect with a wallet that has a registered ENS name
  • Create new Safe

Screenshots

Screenshot 2022-01-18 at 12 03 54

Screenshot 2022-01-18 at 12 04 03

@usame-algan usame-algan self-assigned this Jan 10, 2022
@github-actions
Copy link

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented Jan 10, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@coveralls
Copy link

coveralls commented Jan 10, 2022

Pull Request Test Coverage Report for Build 1729147136

  • 57 of 61 (93.44%) changed or added relevant lines in 13 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.4%) to 32.341%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/routes/CreateSafePage/steps/OwnersAndConfirmationsNewSafeStep.tsx 14 15 93.33%
src/routes/CreateSafePage/components/SafeCreationProcess.tsx 0 3 0.0%
Totals Coverage Status
Change from base Build 1729078921: 0.4%
Covered Lines: 3172
Relevant Lines: 8716

💛 - Coveralls

@github-actions
Copy link

Deployment links

🟠 Safe Rinkeby Safe Mainnet 🟣 Safe Polygon 🟡 Safe BSC Safe Arbitrum 🟢 Safe xDai

@github-actions
Copy link

github-actions bot commented Jan 13, 2022

E2E Tests Failed
Check the results here: https://github.com/gnosis/safe-react-e2e-tests/actions/runs/1728389674

Failed tests:

  • ❌ Address book Address book
  • ❌ Safe Apps List Safe Apps List
  • ❌ Read-only transaction creation and review Read-only transaction creation and review

@github-actions
Copy link

github-actions bot commented Jan 14, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 2 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@usame-algan usame-algan marked this pull request as ready for review January 17, 2022 09:50
@katspaugh
Copy link
Member

Usame:
the actual typed value shouldn't be used as a placeholder.

@katspaugh
Copy link
Member

Something is wrong with the branch, it shows too many changes.

@usame-algan
Copy link
Member Author

Something is wrong with the branch, it shows too many changes.

Had to rebase it to safe-ens-domain-with-provider so we could use reverseENSLookup but probably makes more sense to wait until that branch is merged so we can rebase to dev again

@usame-algan usame-algan changed the title feat: Add ENS Reverse Lookup to Load Safe process feat: Add ENS Reverse Lookup to Create/Load Safe process Jan 18, 2022
Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

Amazing!

Copy link
Member

@iamacook iamacook left a comment

Choose a reason for hiding this comment

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

🚀

}

const isValidAddress = sameString(verifiedAddress, address)
return isValidAddress ? name : ''
Copy link
Member

Choose a reason for hiding this comment

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

This changed in the provider inclusion ticket. Maybe you should rebase on that?

# Conflicts:
#	package.json
#	src/logic/wallets/getWeb3.ts
@github-actions
Copy link

Deployment links

🟠 Rinkeby Mainnet 🟣 Polygon 🟡 BSC Arbitrum 🟢 Gnosis Chain

@francovenica
Copy link
Contributor

This addresses have ENS names:
0x7724b234c9099C205F03b458944942bcEBA13408 francotest2.eth
0x61a0c717d18232711bC788F19C9Cd56a43cc8872 francotest.eth

Issues:
1 - Safe creation:
The name of the same is empty by default and allows me to jump to the next step. There should be a randomly generated name by default.
Is expected that if the input is empty an error shows up that prevents the user to go to the next step
image

2 - Question/issue
Safe creation step 2
The user that is currently connected shows the ENS name fine (without the .eth), but if I add more addresses that also have ENS names those won't show it, just "Owner name" is set as default.
Should new addresses added show the ENS names?
image

@usame-algan
Copy link
Member Author

Issues: 1 - Safe creation: The name of the same is empty by default and allows me to jump to the next step. There should be a randomly generated name by default.

This happened to me too while testing but I thought it was a hot reload issue. I will look into it!

2 - Question/issue Safe creation step 2 The user that is currently connected shows the ENS name fine (without the .eth), but if I add more addresses that also have ENS names those won't show it, just "Owner name" is set as default. Should new addresses added show the ENS names?

Good catch! I would suggest we also fetch ENS when manually adding new Owners. cc @katspaugh

@francovenica
Copy link
Contributor

1 - Fixed

2 - Is mostly fixed. It still shows "Owner name" when an address is introduced. It changes to the ENS name if you click in the input.
01-20-2022_x(4006)

@usame-algan
Copy link
Member Author

2 - Is mostly fixed. It still shows "Owner name" when an address is introduced. It changes to the ENS name if you click in the input.

Thanks for testing Franco! I added support to fetch ENS when importing an owner via QR Code.

@francovenica
Copy link
Contributor

Looks good to me.

@usame-algan usame-algan merged commit dd8724e into dev Jan 21, 2022
@usame-algan usame-algan deleted the safe-creation-reverse-ens-lookup branch January 21, 2022 14:33
@github-actions github-actions bot locked and limited conversation to collaborators Jan 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reverse ENS lookup
5 participants