-
Notifications
You must be signed in to change notification settings - Fork 55
Conversation
CLA Assistant Lite All Contributors have signed the CLA. |
|
}) | ||
} catch (error) { | ||
console.error('error adding eth network: ', chainId, info, error) | ||
throw new Error(error?.message) |
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.
this is the only MOD, L34.
open to not using a new error object, just needs to be rethrown.
if (error.code === 4902 && chainId !== undefined) { | ||
const info = CHAIN_INFO[chainId] | ||
|
||
// MOD - need to handle these errors, else loops |
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.
L33 - 42 (try
/catch
) block is the MOD. Without proper error handling this loops
Hey @W3stside , great changes! |
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.
Woah pure magic!
Had no idea this was already there O.O
My post vacay energy helped me find it 👁️👁️👁️👁️👁️👁️👁️👁️👁️👁️👁️👁️👁️👁️👁️👁️👁️👁️👁️👁️👁️👁️👁️ |
Closes #1867
Summary
Adds correct network adding logic when chain NOT in MM, fixes loop error and chain info object type (uni related)
Screenies
TESTING