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

(Fix) Prevent ENS check when not supported#1570

Merged
fernandomg merged 14 commits intodevelopmentfrom
fix/#1557-prevent-ENS-check-when-incompatible
Nov 10, 2020
Merged

(Fix) Prevent ENS check when not supported#1570
fernandomg merged 14 commits intodevelopmentfrom
fix/#1557-prevent-ENS-check-when-incompatible

Conversation

@fernandomg
Copy link
Contributor

This PR closes #1557, by:

  • renaming AddressBookInput to BaseAddressBookInput
  • creating two wrappers AddressBookInput and ContractsAddressBookInput. Each one with its respective responsibilities.
  • disabling ENS checks and error messages if it's not supported by the network
  • adding a new disabledFeatures entry for ENS
  • disabling ENS for EWC, Volta, and xDai.

Notes:

  • I wasn't able to accomplish what I wanted. Completely refactor AddressBookInput and the "form" state handling.
  • What I did, was to re-write the whole logic around AddressBookInput to prevent unnecessary re-renders and undesired updates.
  • There's still plenty to work/refactor. But I found it a bit more easy to reason about.

If changes around AddressBookInput doesn't justify the refactor, I can re-do this whole fix, and just add the ENS-related conditions in the previous code

@fernandomg fernandomg self-assigned this Nov 5, 2020
@github-actions
Copy link

github-actions bot commented Nov 5, 2020

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented Nov 5, 2020

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 5 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@ghost
Copy link

ghost commented Nov 5, 2020

Travis automatic deployment:
https://pr1570--safereact.review.gnosisdev.com/volta/app

@ghost
Copy link

ghost commented Nov 5, 2020

Travis automatic deployment:
https://pr1570--safereact.review.gnosisdev.com/rinkeby/app

@ghost
Copy link

ghost commented Nov 5, 2020

Travis automatic deployment:
https://pr1570--safereact.review.gnosisdev.com/volta/app

@ghost
Copy link

ghost commented Nov 5, 2020

Travis automatic deployment:
https://pr1570--safereact.review.gnosisdev.com/rinkeby/app

@ghost
Copy link

ghost commented Nov 5, 2020

Travis automatic deployment:
https://pr1570--safereact.review.gnosisdev.com/volta/app

@ghost
Copy link

ghost commented Nov 5, 2020

Travis automatic deployment:
https://pr1570--safereact.review.gnosisdev.com/rinkeby/app

@fernandomg fernandomg requested a review from dasanra November 5, 2020 16:54
@ghost
Copy link

ghost commented Nov 5, 2020

Travis automatic deployment:
https://pr1570--safereact.review.gnosisdev.com/volta/app

@ghost
Copy link

ghost commented Nov 5, 2020

Travis automatic deployment:
https://pr1570--safereact.review.gnosisdev.com/rinkeby/app

@ghost
Copy link

ghost commented Nov 6, 2020

Travis automatic deployment:
https://pr1570--safereact.review.gnosisdev.com/rinkeby/app

@ghost
Copy link

ghost commented Nov 6, 2020

Travis automatic deployment:
https://pr1570--safereact.review.gnosisdev.com/volta/app

@francovenica
Copy link
Contributor

francovenica commented Nov 9, 2020

Issue:

In the Contract interaction form, whenever you write a random string of characters an error msj will show up (which is expected), but when I delete the string and I input a real contract address the Error message won't go away, even when the form loads the ABI from that contract address.
https://www.loom.com/share/e63189e580ad4978bec5334c74f73d6b

Safe: https://pr1570--safereact.review.gnosisdev.com/rinkeby/app/#/safes/0x9913B9180C20C6b0F21B6480c84422F6ebc4B808/settings

@fernandomg
Copy link
Contributor Author

Issue:

In the Contract interaction form, whenever you write a random string of characters an error msj will show up (which is expected), but when I delete the string and I input a real contract address the Error message won't go away, even when the form loads the ABI from that contract address.
loom.com/share/e63189e580ad4978bec5334c74f73d6b

Safe: pr1570--safereact.review.gnosisdev.com/rinkeby/app/#/safes/0x9913B9180C20C6b0F21B6480c84422F6ebc4B808/settings

@francovenica,
Fixed, thanks for the catch!

@ghost
Copy link

ghost commented Nov 9, 2020

Travis automatic deployment:
https://pr1570--safereact.review.gnosisdev.com/volta/app

@ghost
Copy link

ghost commented Nov 9, 2020

Travis automatic deployment:
https://pr1570--safereact.review.gnosisdev.com/rinkeby/app

@francovenica
Copy link
Contributor

The issue was fixed

I tried with some ENS names I have
francotest.eth
safe.test
test.test

I checked that those are not read in the volta network and the error just reflects that those names are a string of characters, and not a ENS name.
In the rinkeby network the name still works as always

Tested in Contract Interactions, Address book entries, Settings user adding/replacement, Safe creation (for owners addresses), Safe Loading (for safes addresses)

Looks good to me

@ghost
Copy link

ghost commented Nov 10, 2020

Travis automatic deployment:
https://pr1570--safereact.review.gnosisdev.com/volta/app

@ghost
Copy link

ghost commented Nov 10, 2020

Travis automatic deployment:
https://pr1570--safereact.review.gnosisdev.com/rinkeby/app

@fernandomg fernandomg merged commit 325864c into development Nov 10, 2020
@fernandomg fernandomg deleted the fix/#1557-prevent-ENS-check-when-incompatible branch November 10, 2020 19:16
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2020
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.

[xDai] Don't display "ENS" in the error message for the address field if the network is not support ENS

4 participants