-
Notifications
You must be signed in to change notification settings - Fork 500
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
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🟡 Heimdall Review Status
|
@@ -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); |
There was a problem hiding this comment.
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.
const { chain: basenameChain } = useAccount(); | ||
const resolverAddress = basenameChain?.id ? USERNAME_L2_RESOLVER_ADDRESSES[basenameChain.id] : '0x'; |
There was a problem hiding this comment.
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?
What changed? Why?
When a user is sending a name to a plain
0x..
address or an L1 ens name, we incorrectly set thebaseNameChain
as sepoliaThis PR makes it so that we always infer the chain from the connected account instead of from the ens name.
Notes to reviewers
How has it been tested?