Skip to content
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

Override subscriptionManager.middleware.destroy to also remove sub entry #4984

Draft
wants to merge 8 commits into
base: caip-multichain-api
Choose a base branch
from

Conversation

jiexi
Copy link
Contributor

@jiexi jiexi commented Nov 26, 2024

Explanation

Ensures that the subscription entry for a subscription is removed when the middleware is destroyed

References

Changelog

@metamask/package-a

  • : Your change here
  • : Your change here

@metamask/package-b

  • : Your change here
  • : Your change here

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@jiexi
Copy link
Contributor Author

jiexi commented Nov 26, 2024

@metamaskbot publish-preview

@jiexi
Copy link
Contributor Author

jiexi commented Nov 26, 2024

@metamaskbot publish-previews

Copy link
Contributor

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/accounts-controller": "20.0.0-preview-7f262294",
  "@metamask-previews/address-book-controller": "6.0.1-preview-7f262294",
  "@metamask-previews/announcement-controller": "7.0.1-preview-7f262294",
  "@metamask-previews/approval-controller": "7.1.1-preview-7f262294",
  "@metamask-previews/assets-controllers": "45.1.0-preview-7f262294",
  "@metamask-previews/base-controller": "7.0.2-preview-7f262294",
  "@metamask-previews/build-utils": "3.0.1-preview-7f262294",
  "@metamask-previews/chain-controller": "0.2.0-preview-7f262294",
  "@metamask-previews/composable-controller": "9.0.1-preview-7f262294",
  "@metamask-previews/controller-utils": "11.4.3-preview-7f262294",
  "@metamask-previews/ens-controller": "15.0.0-preview-7f262294",
  "@metamask-previews/eth-json-rpc-provider": "4.1.6-preview-7f262294",
  "@metamask-previews/gas-fee-controller": "22.0.1-preview-7f262294",
  "@metamask-previews/json-rpc-engine": "10.0.1-preview-7f262294",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.5-preview-7f262294",
  "@metamask-previews/keyring-controller": "19.0.0-preview-7f262294",
  "@metamask-previews/logging-controller": "6.0.2-preview-7f262294",
  "@metamask-previews/message-manager": "11.0.1-preview-7f262294",
  "@metamask-previews/multichain": "1.1.0-preview-7f262294",
  "@metamask-previews/name-controller": "8.0.1-preview-7f262294",
  "@metamask-previews/network-controller": "22.0.2-preview-7f262294",
  "@metamask-previews/notification-controller": "7.0.0-preview-7f262294",
  "@metamask-previews/notification-services-controller": "0.14.0-preview-7f262294",
  "@metamask-previews/permission-controller": "11.0.3-preview-7f262294",
  "@metamask-previews/permission-log-controller": "3.0.1-preview-7f262294",
  "@metamask-previews/phishing-controller": "12.3.0-preview-7f262294",
  "@metamask-previews/polling-controller": "12.0.1-preview-7f262294",
  "@metamask-previews/preferences-controller": "15.0.0-preview-7f262294",
  "@metamask-previews/profile-sync-controller": "2.0.0-preview-7f262294",
  "@metamask-previews/queued-request-controller": "8.0.0-preview-7f262294",
  "@metamask-previews/rate-limit-controller": "6.0.1-preview-7f262294",
  "@metamask-previews/selected-network-controller": "20.0.0-preview-7f262294",
  "@metamask-previews/signature-controller": "23.0.0-preview-7f262294",
  "@metamask-previews/transaction-controller": "41.0.0-preview-7f262294",
  "@metamask-previews/user-operation-controller": "20.0.0-preview-7f262294"
}

@jiexi
Copy link
Contributor Author

jiexi commented Nov 27, 2024

@metamaskbot publish-previews

Copy link
Contributor

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/accounts-controller": "20.0.0-preview-8a04affb",
  "@metamask-previews/address-book-controller": "6.0.1-preview-8a04affb",
  "@metamask-previews/announcement-controller": "7.0.1-preview-8a04affb",
  "@metamask-previews/approval-controller": "7.1.1-preview-8a04affb",
  "@metamask-previews/assets-controllers": "45.1.0-preview-8a04affb",
  "@metamask-previews/base-controller": "7.0.2-preview-8a04affb",
  "@metamask-previews/build-utils": "3.0.1-preview-8a04affb",
  "@metamask-previews/chain-controller": "0.2.0-preview-8a04affb",
  "@metamask-previews/composable-controller": "9.0.1-preview-8a04affb",
  "@metamask-previews/controller-utils": "11.4.3-preview-8a04affb",
  "@metamask-previews/ens-controller": "15.0.0-preview-8a04affb",
  "@metamask-previews/eth-json-rpc-provider": "4.1.6-preview-8a04affb",
  "@metamask-previews/gas-fee-controller": "22.0.1-preview-8a04affb",
  "@metamask-previews/json-rpc-engine": "10.0.1-preview-8a04affb",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.5-preview-8a04affb",
  "@metamask-previews/keyring-controller": "19.0.0-preview-8a04affb",
  "@metamask-previews/logging-controller": "6.0.2-preview-8a04affb",
  "@metamask-previews/message-manager": "11.0.1-preview-8a04affb",
  "@metamask-previews/multichain": "1.1.0-preview-8a04affb",
  "@metamask-previews/name-controller": "8.0.1-preview-8a04affb",
  "@metamask-previews/network-controller": "22.0.2-preview-8a04affb",
  "@metamask-previews/notification-controller": "7.0.0-preview-8a04affb",
  "@metamask-previews/notification-services-controller": "0.14.0-preview-8a04affb",
  "@metamask-previews/permission-controller": "11.0.3-preview-8a04affb",
  "@metamask-previews/permission-log-controller": "3.0.1-preview-8a04affb",
  "@metamask-previews/phishing-controller": "12.3.0-preview-8a04affb",
  "@metamask-previews/polling-controller": "12.0.1-preview-8a04affb",
  "@metamask-previews/preferences-controller": "15.0.0-preview-8a04affb",
  "@metamask-previews/profile-sync-controller": "2.0.0-preview-8a04affb",
  "@metamask-previews/queued-request-controller": "8.0.0-preview-8a04affb",
  "@metamask-previews/rate-limit-controller": "6.0.1-preview-8a04affb",
  "@metamask-previews/selected-network-controller": "20.0.0-preview-8a04affb",
  "@metamask-previews/signature-controller": "23.0.0-preview-8a04affb",
  "@metamask-previews/transaction-controller": "41.0.0-preview-8a04affb",
  "@metamask-previews/user-operation-controller": "20.0.0-preview-8a04affb"
}

@jiexi
Copy link
Contributor Author

jiexi commented Nov 27, 2024

@metamaskbot publish-previews

Copy link
Contributor

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/accounts-controller": "20.0.0-preview-ad39b13e",
  "@metamask-previews/address-book-controller": "6.0.1-preview-ad39b13e",
  "@metamask-previews/announcement-controller": "7.0.1-preview-ad39b13e",
  "@metamask-previews/approval-controller": "7.1.1-preview-ad39b13e",
  "@metamask-previews/assets-controllers": "45.1.0-preview-ad39b13e",
  "@metamask-previews/base-controller": "7.0.2-preview-ad39b13e",
  "@metamask-previews/build-utils": "3.0.1-preview-ad39b13e",
  "@metamask-previews/chain-controller": "0.2.0-preview-ad39b13e",
  "@metamask-previews/composable-controller": "9.0.1-preview-ad39b13e",
  "@metamask-previews/controller-utils": "11.4.3-preview-ad39b13e",
  "@metamask-previews/ens-controller": "15.0.0-preview-ad39b13e",
  "@metamask-previews/eth-json-rpc-provider": "4.1.6-preview-ad39b13e",
  "@metamask-previews/gas-fee-controller": "22.0.1-preview-ad39b13e",
  "@metamask-previews/json-rpc-engine": "10.0.1-preview-ad39b13e",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.5-preview-ad39b13e",
  "@metamask-previews/keyring-controller": "19.0.0-preview-ad39b13e",
  "@metamask-previews/logging-controller": "6.0.2-preview-ad39b13e",
  "@metamask-previews/message-manager": "11.0.1-preview-ad39b13e",
  "@metamask-previews/multichain": "1.1.0-preview-ad39b13e",
  "@metamask-previews/name-controller": "8.0.1-preview-ad39b13e",
  "@metamask-previews/network-controller": "22.0.2-preview-ad39b13e",
  "@metamask-previews/notification-controller": "7.0.0-preview-ad39b13e",
  "@metamask-previews/notification-services-controller": "0.14.0-preview-ad39b13e",
  "@metamask-previews/permission-controller": "11.0.3-preview-ad39b13e",
  "@metamask-previews/permission-log-controller": "3.0.1-preview-ad39b13e",
  "@metamask-previews/phishing-controller": "12.3.0-preview-ad39b13e",
  "@metamask-previews/polling-controller": "12.0.1-preview-ad39b13e",
  "@metamask-previews/preferences-controller": "15.0.0-preview-ad39b13e",
  "@metamask-previews/profile-sync-controller": "2.0.0-preview-ad39b13e",
  "@metamask-previews/queued-request-controller": "8.0.0-preview-ad39b13e",
  "@metamask-previews/rate-limit-controller": "6.0.1-preview-ad39b13e",
  "@metamask-previews/selected-network-controller": "20.0.0-preview-ad39b13e",
  "@metamask-previews/signature-controller": "23.0.0-preview-ad39b13e",
  "@metamask-previews/transaction-controller": "41.0.0-preview-ad39b13e",
  "@metamask-previews/user-operation-controller": "20.0.0-preview-ad39b13e"
}

@jiexi
Copy link
Contributor Author

jiexi commented Nov 27, 2024

@metamaskbot publish-previews

Copy link
Contributor

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/accounts-controller": "20.0.0-preview-f06d0346",
  "@metamask-previews/address-book-controller": "6.0.1-preview-f06d0346",
  "@metamask-previews/announcement-controller": "7.0.1-preview-f06d0346",
  "@metamask-previews/approval-controller": "7.1.1-preview-f06d0346",
  "@metamask-previews/assets-controllers": "45.1.0-preview-f06d0346",
  "@metamask-previews/base-controller": "7.0.2-preview-f06d0346",
  "@metamask-previews/build-utils": "3.0.1-preview-f06d0346",
  "@metamask-previews/chain-controller": "0.2.0-preview-f06d0346",
  "@metamask-previews/composable-controller": "9.0.1-preview-f06d0346",
  "@metamask-previews/controller-utils": "11.4.3-preview-f06d0346",
  "@metamask-previews/ens-controller": "15.0.0-preview-f06d0346",
  "@metamask-previews/eth-json-rpc-provider": "4.1.6-preview-f06d0346",
  "@metamask-previews/gas-fee-controller": "22.0.1-preview-f06d0346",
  "@metamask-previews/json-rpc-engine": "10.0.1-preview-f06d0346",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.5-preview-f06d0346",
  "@metamask-previews/keyring-controller": "19.0.0-preview-f06d0346",
  "@metamask-previews/logging-controller": "6.0.2-preview-f06d0346",
  "@metamask-previews/message-manager": "11.0.1-preview-f06d0346",
  "@metamask-previews/multichain": "1.1.0-preview-f06d0346",
  "@metamask-previews/name-controller": "8.0.1-preview-f06d0346",
  "@metamask-previews/network-controller": "22.0.2-preview-f06d0346",
  "@metamask-previews/notification-controller": "7.0.0-preview-f06d0346",
  "@metamask-previews/notification-services-controller": "0.14.0-preview-f06d0346",
  "@metamask-previews/permission-controller": "11.0.3-preview-f06d0346",
  "@metamask-previews/permission-log-controller": "3.0.1-preview-f06d0346",
  "@metamask-previews/phishing-controller": "12.3.0-preview-f06d0346",
  "@metamask-previews/polling-controller": "12.0.1-preview-f06d0346",
  "@metamask-previews/preferences-controller": "15.0.0-preview-f06d0346",
  "@metamask-previews/profile-sync-controller": "2.0.0-preview-f06d0346",
  "@metamask-previews/queued-request-controller": "8.0.0-preview-f06d0346",
  "@metamask-previews/rate-limit-controller": "6.0.1-preview-f06d0346",
  "@metamask-previews/selected-network-controller": "20.0.0-preview-f06d0346",
  "@metamask-previews/signature-controller": "23.0.0-preview-f06d0346",
  "@metamask-previews/transaction-controller": "41.0.0-preview-f06d0346",
  "@metamask-previews/user-operation-controller": "20.0.0-preview-f06d0346"
}

@jiexi
Copy link
Contributor Author

jiexi commented Nov 27, 2024

@metamaskbot publish-previews

Copy link
Contributor

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/accounts-controller": "20.0.0-preview-4fc4dc87",
  "@metamask-previews/address-book-controller": "6.0.1-preview-4fc4dc87",
  "@metamask-previews/announcement-controller": "7.0.1-preview-4fc4dc87",
  "@metamask-previews/approval-controller": "7.1.1-preview-4fc4dc87",
  "@metamask-previews/assets-controllers": "45.1.0-preview-4fc4dc87",
  "@metamask-previews/base-controller": "7.0.2-preview-4fc4dc87",
  "@metamask-previews/build-utils": "3.0.1-preview-4fc4dc87",
  "@metamask-previews/chain-controller": "0.2.0-preview-4fc4dc87",
  "@metamask-previews/composable-controller": "9.0.1-preview-4fc4dc87",
  "@metamask-previews/controller-utils": "11.4.3-preview-4fc4dc87",
  "@metamask-previews/ens-controller": "15.0.0-preview-4fc4dc87",
  "@metamask-previews/eth-json-rpc-provider": "4.1.6-preview-4fc4dc87",
  "@metamask-previews/gas-fee-controller": "22.0.1-preview-4fc4dc87",
  "@metamask-previews/json-rpc-engine": "10.0.1-preview-4fc4dc87",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.5-preview-4fc4dc87",
  "@metamask-previews/keyring-controller": "19.0.0-preview-4fc4dc87",
  "@metamask-previews/logging-controller": "6.0.2-preview-4fc4dc87",
  "@metamask-previews/message-manager": "11.0.1-preview-4fc4dc87",
  "@metamask-previews/multichain": "1.1.0-preview-4fc4dc87",
  "@metamask-previews/name-controller": "8.0.1-preview-4fc4dc87",
  "@metamask-previews/network-controller": "22.0.2-preview-4fc4dc87",
  "@metamask-previews/notification-controller": "7.0.0-preview-4fc4dc87",
  "@metamask-previews/notification-services-controller": "0.14.0-preview-4fc4dc87",
  "@metamask-previews/permission-controller": "11.0.3-preview-4fc4dc87",
  "@metamask-previews/permission-log-controller": "3.0.1-preview-4fc4dc87",
  "@metamask-previews/phishing-controller": "12.3.0-preview-4fc4dc87",
  "@metamask-previews/polling-controller": "12.0.1-preview-4fc4dc87",
  "@metamask-previews/preferences-controller": "15.0.0-preview-4fc4dc87",
  "@metamask-previews/profile-sync-controller": "2.0.0-preview-4fc4dc87",
  "@metamask-previews/queued-request-controller": "8.0.0-preview-4fc4dc87",
  "@metamask-previews/rate-limit-controller": "6.0.1-preview-4fc4dc87",
  "@metamask-previews/selected-network-controller": "20.0.0-preview-4fc4dc87",
  "@metamask-previews/signature-controller": "23.0.0-preview-4fc4dc87",
  "@metamask-previews/transaction-controller": "41.0.0-preview-4fc4dc87",
  "@metamask-previews/user-operation-controller": "20.0.0-preview-4fc4dc87"
}

@jiexi
Copy link
Contributor Author

jiexi commented Nov 27, 2024

@metamaskbot publish-previews

Copy link
Contributor

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/accounts-controller": "20.0.0-preview-9b7b95ec",
  "@metamask-previews/address-book-controller": "6.0.1-preview-9b7b95ec",
  "@metamask-previews/announcement-controller": "7.0.1-preview-9b7b95ec",
  "@metamask-previews/approval-controller": "7.1.1-preview-9b7b95ec",
  "@metamask-previews/assets-controllers": "45.1.0-preview-9b7b95ec",
  "@metamask-previews/base-controller": "7.0.2-preview-9b7b95ec",
  "@metamask-previews/build-utils": "3.0.1-preview-9b7b95ec",
  "@metamask-previews/chain-controller": "0.2.0-preview-9b7b95ec",
  "@metamask-previews/composable-controller": "9.0.1-preview-9b7b95ec",
  "@metamask-previews/controller-utils": "11.4.3-preview-9b7b95ec",
  "@metamask-previews/ens-controller": "15.0.0-preview-9b7b95ec",
  "@metamask-previews/eth-json-rpc-provider": "4.1.6-preview-9b7b95ec",
  "@metamask-previews/gas-fee-controller": "22.0.1-preview-9b7b95ec",
  "@metamask-previews/json-rpc-engine": "10.0.1-preview-9b7b95ec",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.5-preview-9b7b95ec",
  "@metamask-previews/keyring-controller": "19.0.0-preview-9b7b95ec",
  "@metamask-previews/logging-controller": "6.0.2-preview-9b7b95ec",
  "@metamask-previews/message-manager": "11.0.1-preview-9b7b95ec",
  "@metamask-previews/multichain": "1.1.0-preview-9b7b95ec",
  "@metamask-previews/name-controller": "8.0.1-preview-9b7b95ec",
  "@metamask-previews/network-controller": "22.0.2-preview-9b7b95ec",
  "@metamask-previews/notification-controller": "7.0.0-preview-9b7b95ec",
  "@metamask-previews/notification-services-controller": "0.14.0-preview-9b7b95ec",
  "@metamask-previews/permission-controller": "11.0.3-preview-9b7b95ec",
  "@metamask-previews/permission-log-controller": "3.0.1-preview-9b7b95ec",
  "@metamask-previews/phishing-controller": "12.3.0-preview-9b7b95ec",
  "@metamask-previews/polling-controller": "12.0.1-preview-9b7b95ec",
  "@metamask-previews/preferences-controller": "15.0.0-preview-9b7b95ec",
  "@metamask-previews/profile-sync-controller": "2.0.0-preview-9b7b95ec",
  "@metamask-previews/queued-request-controller": "8.0.0-preview-9b7b95ec",
  "@metamask-previews/rate-limit-controller": "6.0.1-preview-9b7b95ec",
  "@metamask-previews/selected-network-controller": "20.0.0-preview-9b7b95ec",
  "@metamask-previews/signature-controller": "23.0.0-preview-9b7b95ec",
  "@metamask-previews/transaction-controller": "41.0.0-preview-9b7b95ec",
  "@metamask-previews/user-operation-controller": "20.0.0-preview-9b7b95ec"
}

@jiexi
Copy link
Contributor Author

jiexi commented Nov 27, 2024

@metamaskbot publish-previews

Copy link
Contributor

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/accounts-controller": "20.0.0-preview-1c8fd633",
  "@metamask-previews/address-book-controller": "6.0.1-preview-1c8fd633",
  "@metamask-previews/announcement-controller": "7.0.1-preview-1c8fd633",
  "@metamask-previews/approval-controller": "7.1.1-preview-1c8fd633",
  "@metamask-previews/assets-controllers": "45.1.0-preview-1c8fd633",
  "@metamask-previews/base-controller": "7.0.2-preview-1c8fd633",
  "@metamask-previews/build-utils": "3.0.1-preview-1c8fd633",
  "@metamask-previews/chain-controller": "0.2.0-preview-1c8fd633",
  "@metamask-previews/composable-controller": "9.0.1-preview-1c8fd633",
  "@metamask-previews/controller-utils": "11.4.3-preview-1c8fd633",
  "@metamask-previews/ens-controller": "15.0.0-preview-1c8fd633",
  "@metamask-previews/eth-json-rpc-provider": "4.1.6-preview-1c8fd633",
  "@metamask-previews/gas-fee-controller": "22.0.1-preview-1c8fd633",
  "@metamask-previews/json-rpc-engine": "10.0.1-preview-1c8fd633",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.5-preview-1c8fd633",
  "@metamask-previews/keyring-controller": "19.0.0-preview-1c8fd633",
  "@metamask-previews/logging-controller": "6.0.2-preview-1c8fd633",
  "@metamask-previews/message-manager": "11.0.1-preview-1c8fd633",
  "@metamask-previews/multichain": "1.1.0-preview-1c8fd633",
  "@metamask-previews/name-controller": "8.0.1-preview-1c8fd633",
  "@metamask-previews/network-controller": "22.0.2-preview-1c8fd633",
  "@metamask-previews/notification-controller": "7.0.0-preview-1c8fd633",
  "@metamask-previews/notification-services-controller": "0.14.0-preview-1c8fd633",
  "@metamask-previews/permission-controller": "11.0.3-preview-1c8fd633",
  "@metamask-previews/permission-log-controller": "3.0.1-preview-1c8fd633",
  "@metamask-previews/phishing-controller": "12.3.0-preview-1c8fd633",
  "@metamask-previews/polling-controller": "12.0.1-preview-1c8fd633",
  "@metamask-previews/preferences-controller": "15.0.0-preview-1c8fd633",
  "@metamask-previews/profile-sync-controller": "2.0.0-preview-1c8fd633",
  "@metamask-previews/queued-request-controller": "8.0.0-preview-1c8fd633",
  "@metamask-previews/rate-limit-controller": "6.0.1-preview-1c8fd633",
  "@metamask-previews/selected-network-controller": "20.0.0-preview-1c8fd633",
  "@metamask-previews/signature-controller": "23.0.0-preview-1c8fd633",
  "@metamask-previews/transaction-controller": "41.0.0-preview-1c8fd633",
  "@metamask-previews/user-operation-controller": "20.0.0-preview-1c8fd633"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant