I'd like to only resolve UD in Layer1, but not passing Layer2 would throw the following error:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'network')
at Resolution.fromEthersProvider (Resolution.js:320:1)
at tryLookupUDName (HeaderAccountPopover.tsx:64:1)
at resolveENSInfo (HeaderAccountPopover.tsx:118:1)
at HeaderAccountPopover.tsx:128:1
at invokePassiveEffectCreate (react-dom.development.js:23487:1)
at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1)
at invokeGuardedCallback (react-dom.development.js:4056:1)
at flushPassiveEffectsImpl (react-dom.development.js:23574:1)
at unstable_runWithPriority (scheduler.development.js:468:1)
at runWithPriority$1 (react-dom.development.js:11276:1)
at flushPassiveEffects (react-dom.development.js:23447:1)
at react-dom.development.js:23324:1
at workLoop (scheduler.development.js:417:1)
at flushWork (scheduler.development.js:390:1)
at MessagePort.performWorkUntilDeadline (scheduler.development.js:157:1)
Could you please allow only passing in one location?
Currently
Resolution.fromEthersProvider
can only be used with two types of params:Resolution.fromEthersProvider({})
(because thenetworks
{} is not optional)I'd like to only resolve UD in Layer1, but not passing Layer2 would throw the following error:
Could you please allow only passing in one location?
Reference
https://github.com/unstoppabledomains/resolution/blob/62dd1ccfc58fc192a6432269c046042b295d622d/src/Resolution.ts#L387-L421