-
-
Notifications
You must be signed in to change notification settings - Fork 277
eth-json-rpc-provider migration - Integration into packages/
#1738
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
Changes from all commits
a0f04f8
58b7e5e
fe985a2
26dcd51
7befb4e
b3338ce
f02b824
4c8fea7
a32e68a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| export * from './provider-from-engine'; | ||
| export * from './provider-from-middleware'; | ||
| export type { SafeEventEmitterProvider } from './safe-event-emitter-provider'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This changes what is being exported (the whole class instead of just the type). What's the reason for this change?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See: first line of
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, no problem. I guess this wouldn't be a breaking change, so it's okay. |
||
| export { SafeEventEmitterProvider } from './safe-event-emitter-provider'; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,7 @@ | |
| "@metamask/controller-utils": "^5.0.2", | ||
| "@metamask/eth-json-rpc-infura": "^9.0.0", | ||
| "@metamask/eth-json-rpc-middleware": "^12.0.0", | ||
| "@metamask/eth-json-rpc-provider": "^2.1.0", | ||
| "@metamask/eth-json-rpc-provider": "^2.2.0", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm. Given that we are affecting other packages in this PR, should we bump everything to ^2.2.0 first? I think it'd be better to keep this PR just focused to
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is necessary because of the reference path shadowing thing we discussed. Once
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That makes sense, but isn't this happening because
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could bump eth-json-rpc-provider to 2.2.0 everywhere first in a separate PR, but that PR wouldn't include the changes being made to Because fixing the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we could change the |
||
| "@metamask/eth-query": "^3.0.1", | ||
| "@metamask/json-rpc-engine": "^7.1.1", | ||
| "@metamask/rpc-errors": "^6.1.0", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| import { SafeEventEmitterProvider } from '@metamask/eth-json-rpc-provider/dist/safe-event-emitter-provider'; | ||
| import { SafeEventEmitterProvider } from '@metamask/eth-json-rpc-provider'; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See line 85: export class FakeProvider extends SafeEventEmitterProvider {Importing This is why the previous import statement pointed directly to That import statement can no longer be used (it won't point to
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see. Thank you for explaining, somehow that was not connecting. |
||
| import { JsonRpcEngine } from '@metamask/json-rpc-engine'; | ||
| import type { JsonRpcRequest, JsonRpcResponse } from '@metamask/utils'; | ||
| import { inspect, isDeepStrictEqual } from 'util'; | ||
|
|
||
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.
What's the reason for this?
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 one follows from the export statement change for
SafeEventEmitterProviderhttps://github.com/MetaMask/core/pull/1738/files#r1357548245. The test is checking what non-types are being exported fromindex.ts.