-
-
Notifications
You must be signed in to change notification settings - Fork 231
[FIX] - Allow Optimism & Optimism Testnet to be added via wallet_addEthereumChain #910
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
Conversation
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.
LGTM. Removes Optimism and its testnet to be added via wallet_addEthereumChain
.
Test seem to be failing here. src/transaction/TransactionController.test.ts:139:32 - error TS2339: Property 'optimism' does not exist on type 'typeof NetworksChainId'.
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 makes sense to me. That said, the type on line 46 of src/constants.ts
doesn't seem right now, as the object doesn't include all of the properties of NetworkType
, only a subset. I think we should fix that.
@mcmire could you elaborate? It looks like |
@Gudahtt Oops, sorry, I might have been looking at something else. That looks right to me after all. |
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.
LGTM!
…thereumChain (#910) * removed the explict addition of optimism to default networks and updated test cases * updated test case mocks Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
…thereumChain (#910) * removed the explict addition of optimism to default networks and updated test cases * updated test case mocks Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
…thereumChain (#910) * removed the explict addition of optimism to default networks and updated test cases * updated test case mocks Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
PR Title
Allow Optimism & Testnet to be added via
wallet_addEthereumChain
Description
Because optimism was added in the default network list the wallet_addEthereumChain method fails when adding Optimism or the Optimism Testnet. These networks were initially added to identify them as custom network but through further testing the Optimism network is a custom network since it gets added using the
setupStandardProvider
method.FIXED:
REMOVED:
Checklist
Issue
Resolves 4492