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

Fix incorrect linking to sepolia.basescan #913

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dneilroth
Copy link
Collaborator

@dneilroth dneilroth commented Aug 22, 2024

What changed? Why?
When a user is sending a name to a plain 0x.. address or an L1 ens name, we incorrectly set the baseNameChain as sepolia

This PR makes it so that we always infer the chain from the connected account instead of from the ens name.

Screenshot 2024-08-21 at 11 44 10 PM

Notes to reviewers

How has it been tested?

Copy link

vercel bot commented Aug 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
base-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 22, 2024 6:50am
web-base-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 22, 2024 6:50am

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Aug 22, 2024

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@@ -31,12 +29,13 @@ export default function SearchAddressInput({ onChange }: SearchAddressInputProps
/* 2. User enters an Basename */
const validBasename = isBasename(value);

const { basenameChain } = useBasenameChain(value as BaseName);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

when value is an address or L1 ens and not a basename this always returns sepolia. value the address or name the user is trying to send to.

Comment on lines +32 to +33
const { chain: basenameChain } = useAccount();
const resolverAddress = basenameChain?.id ? USERNAME_L2_RESOLVER_ADDRESSES[basenameChain.id] : '0x';
Copy link
Contributor

Choose a reason for hiding this comment

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

if the user is connected to L1 then this won't be a basename chain, right? It'd just be any chain, and the resolver address will be 0x if not base/basesepolia?

if we're setting universalResolverAddress to 0x and the chainId to undefined or mainnet, what's the behavior here?

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