Closed
Conversation
legobeat
suggested changes
Aug 24, 2023
Contributor
legobeat
left a comment
There was a problem hiding this comment.
403 passing (5s)
3 failing
1) MetaMaskController
MetaMaskController Behaviour
#setupUntrustedCommunication
adds a tabId and origin to requests:
Error: Received unexpected hooks:
setApprovalFlowLoadingText
showApprovalSuccess
showApprovalError
getNetworkConfigurations
at createMethodMiddleware (app/scripts/lib/rpc-method-middleware/createMethodMiddleware.js:10:1)
at MetamaskController.currUseCurrencyRateCheck [as setupProviderEngine] (app/scripts/metamask-controller.js:747:60)
at MetamaskController.setupProviderConnection (app/scripts/metamask-controller.js:713:39)
at MetamaskController.setupUntrustedCommunication (app/scripts/metamask-controller.js:655:21)
at Context.<anonymous> (app/scripts/metamask-controller.test.js:1067:11)
at processImmediate (node:internal/timers:476:21)
2) MetaMaskController
MetaMaskController Behaviour
#setupUntrustedCommunication
should add only origin to request if tabId not provided:
Error: Received unexpected hooks:
setApprovalFlowLoadingText
showApprovalSuccess
showApprovalError
getNetworkConfigurations
at createMethodMiddleware (app/scripts/lib/rpc-method-middleware/createMethodMiddleware.js:10:1)
at MetamaskController.currUseCurrencyRateCheck [as setupProviderEngine] (app/scripts/metamask-controller.js:747:60)
at MetamaskController.setupProviderConnection (app/scripts/metamask-controller.js:713:39)
at MetamaskController.setupUntrustedCommunication (app/scripts/metamask-controller.js:655:21)
at Context.<anonymous> (app/scripts/metamask-controller.test.js:1109:11)
at processImmediate (node:internal/timers:476:21)
3) MetaMaskController
MetaMaskController Behaviour
#setupTrustedCommunication
sets up controller JSON-RPC api for trusted communication:
Error: Received unexpected hooks:
setApprovalFlowLoadingText
showApprovalSuccess
showApprovalError
getNetworkConfigurations
at createMethodMiddleware (app/scripts/lib/rpc-method-middleware/createMethodMiddleware.js:10:1)
at MetamaskController.currUseCurrencyRateCheck [as setupProviderEngine] (app/scripts/metamask-controller.js:747:60)
at MetamaskController.setupProviderConnection (app/scripts/metamask-controller.js:713:39)
at MetamaskController.chunk [as setupTrustedCommunication] (app/scripts/metamask-controller.js:670:5)
at Context.<anonymous> (app/scripts/metamask-controller.test.js:1149:24)
at processImmediate (node:internal/timers:476:21)
Error: Exited with code '1'
at runInShell (/home/circleci/project/development/lib/run-command.js:134:29)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runMocha (/home/circleci/project/test/run-unit-tests.js:81:3)
at async start (/home/circleci/project/test/run-unit-tests.js:183:7)
Exited with code exit status 1
Contributor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Contributor
|
This PR has been automatically marked as stale because it has not had recent activity in the last 60 days. It will be closed in 14 days. Thank you for your contributions. |
Contributor
Contributor
|
Hi @rekmarks , is this ticket ready for review? |
Contributor
|
This PR has been automatically marked as stale because it has not had recent activity in the last 60 days. It will be closed in 14 days. Thank you for your contributions. |
Contributor
|
This PR was closed because there has been no follow up activity in the last 14 days. Thank you for your contributions. |
Member
Author
|
Superseded by #24357 |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Removes an unused RPC handler hook that became unused in #20376. Also adds a check to fail immediately at runtime if extraneous hooks are provided, to prevent this from happening again.
Pre-merge reviewer checklist
If further QA is required (e.g. new feature, complex testing steps, large refactor), add the
Extension QA Boardlabel.In this case, a QA Engineer approval will be be required.