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

[Issue #2565] Cross-chain Safe search #2630

Merged

Conversation

Da-Colon
Copy link
Contributor

@Da-Colon Da-Colon commented Dec 13, 2024

Well was trying to show DAO is found on Sepolia, wallet is connected to Ethereum.
image

@Da-Colon Da-Colon self-assigned this Dec 13, 2024
Copy link

netlify bot commented Dec 13, 2024

Deploy Preview for decent-interface-dev ready!

Name Link
🔨 Latest commit 992c141
🔍 Latest deploy log https://app.netlify.com/sites/decent-interface-dev/deploys/675ce5ab7e73310008d96ef0
😎 Deploy Preview https://deploy-preview-2630.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 Author

@Da-Colon Da-Colon left a comment

Choose a reason for hiding this comment

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

Did some clean. Summary

  • Reverted Changes in useIsSafe hook
  • moved specialized code into useSearchDAO hook for a smoother multi-chain experience
  • added new useResolvedAddressMultiChain() hook, similar to our useAddress but checks multiple networks
  • updated useSearchDAO hook accordingly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

New hook to handle multi-chain address resolving. similar to our useAddress hook.

similarly takes a string as an input, but instead of resolving a single chain, loops through all supported networks and resolves the input if its a valid ENS name.

If input is an Address returns valid on all networks

const [searchString, setSearchString] = useState<string>('');
const [errorMessage, setErrorMessage] = useState<string>();

const { address, isValid, isLoading: isAddressLoading } = useAddress(searchString);
const { isSafe, isSafeLoading } = useIsSafe(address);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I reverted changes I made to useIsSafe and instead of continue updating that hook for use here just pulled in what was needed and removed relying on conditional useEffect and more intentionally call to resolve searchInput.

…tdao/decent-interface into issue/2565-cross-chain-dao-search
@Da-Colon Da-Colon merged commit 89b2989 into issue/2565-network-config-extended Dec 16, 2024
7 checks passed
@Da-Colon Da-Colon deleted the issue/2565-cross-chain-dao-search branch December 16, 2024 15:28
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.

3 participants