From c013d7a162e6187a8baeb8be9598a9068935af31 Mon Sep 17 00:00:00 2001
From: Dan J Miller <danjm.com@gmail.com>
Date: Tue, 3 Oct 2023 11:53:40 -0230
Subject: [PATCH 1/7] v11.1.2

---
 CHANGELOG.md | 7 ++++++-
 package.json | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 421b6f8969a9..c3c65908cd0a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## [Unreleased]
 
+## [11.1.2]
+### Fixed
+- Prevent crashes for users that have NFTs without an image and/r limited image data ([#21176](https://github.com/MetaMask/metamask-extension/pull/21176))
+
 ## [11.1.1]
 ### Fixed
 - Ensure NFT settings notice in the NFT import modal is shown and hidden correctly, and that the modal is hidden when clicking the link to settings ([#21100](https://github.com/MetaMask/metamask-extension/pull/21100))
@@ -4040,7 +4044,8 @@ Update styles and spacing on the critical error page  ([#20350](https://github.c
 ### Uncategorized
 - Added the ability to restore accounts from seed words.
 
-[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v11.1.1...HEAD
+[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v11.1.2...HEAD
+[11.1.2]: https://github.com/MetaMask/metamask-extension/compare/v11.1.1...v11.1.2
 [11.1.1]: https://github.com/MetaMask/metamask-extension/compare/v11.1.0...v11.1.1
 [11.1.0]: https://github.com/MetaMask/metamask-extension/compare/v11.0.0...v11.1.0
 [11.0.0]: https://github.com/MetaMask/metamask-extension/compare/v10.35.1...v11.0.0
diff --git a/package.json b/package.json
index 73e126d0bb1e..24aa4b70b1e1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "metamask-crx",
-  "version": "11.1.1",
+  "version": "11.1.2",
   "private": true,
   "repository": {
     "type": "git",

From 5bb3714d61a8926703557019baecaf6dc6171238 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ant=C3=B3nio=20Regadas?= <apregadas@gmail.com>
Date: Tue, 3 Oct 2023 14:26:46 +0100
Subject: [PATCH 2/7] [MMI] - Updates the mmi packages, containing a small fix
 (#21164)

Updates the MMI packages, specifically the SDK one that contains a fix
regarding the content-type header of a client api being set wrongly.

- [x] I've clearly explained:
  - [x] What problem this PR is solving
  - [x] How this problem was solved
  - [x] How reviewers can test my changes
- [x] Sufficient automated test coverage has been added

- [x] Manual testing (e.g. pull and build branch, run in browser, test
code being changed)
- [ ] **IF** this PR fixes a bug in the release milestone, add this PR
to the release milestone

If further QA is required (e.g. new feature, complex testing steps,
large refactor), add the `Extension QA Board` label.

In this case, a QA Engineer approval will be be required.
---
 package.json |  12 +++---
 yarn.lock    | 113 ++++++++++++++++++++++++---------------------------
 2 files changed, 59 insertions(+), 66 deletions(-)

diff --git a/package.json b/package.json
index 24aa4b70b1e1..31db0ad05e1f 100644
--- a/package.json
+++ b/package.json
@@ -223,14 +223,14 @@
     "@keystonehq/metamask-airgapped-keyring": "^0.13.1",
     "@lavamoat/snow": "^1.5.0",
     "@material-ui/core": "^4.11.0",
-    "@metamask-institutional/custody-controller": "^0.2.10",
-    "@metamask-institutional/custody-keyring": "^0.0.27",
-    "@metamask-institutional/extension": "^0.3.3",
-    "@metamask-institutional/institutional-features": "^1.2.2",
+    "@metamask-institutional/custody-controller": "^0.2.14",
+    "@metamask-institutional/custody-keyring": "^1.0.3",
+    "@metamask-institutional/extension": "^0.3.7",
+    "@metamask-institutional/institutional-features": "^1.2.6",
     "@metamask-institutional/portfolio-dashboard": "^1.4.0",
     "@metamask-institutional/rpc-allowlist": "^1.0.0",
-    "@metamask-institutional/sdk": "^0.1.18",
-    "@metamask-institutional/transaction-update": "^0.1.25",
+    "@metamask-institutional/sdk": "^0.1.19",
+    "@metamask-institutional/transaction-update": "^0.1.29",
     "@metamask/address-book-controller": "^3.0.0",
     "@metamask/announcement-controller": "^4.0.0",
     "@metamask/approval-controller": "^3.4.0",
diff --git a/yarn.lock b/yarn.lock
index 08871cfd2113..11b3bcfd18c6 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3628,59 +3628,59 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@metamask-institutional/custody-controller@npm:^0.2.10":
-  version: 0.2.10
-  resolution: "@metamask-institutional/custody-controller@npm:0.2.10"
+"@metamask-institutional/custody-controller@npm:^0.2.14":
+  version: 0.2.14
+  resolution: "@metamask-institutional/custody-controller@npm:0.2.14"
   dependencies:
     "@ethereumjs/util": "npm:^8.0.5"
-    "@metamask-institutional/custody-keyring": "npm:^0.0.27"
-    "@metamask-institutional/sdk": "npm:^0.1.18"
+    "@metamask-institutional/custody-keyring": "npm:^1.0.3"
+    "@metamask-institutional/sdk": "npm:^0.1.19"
     "@metamask-institutional/types": "npm:^1.0.3"
     "@metamask/obs-store": "npm:^8.0.0"
-  checksum: 4ab4c26649f7e7e6e37308b00b2aa21cf40c0a861435a54c49bf0e092b49cbef71189774bd8ca038ace57d561facb8f79a0d98ad55ef0196101a857508e447d9
+  checksum: 75979ba8bc4fa122a886b23525733ec81188cf6b2064f44786e4f32223f225a41ba2ebf1c31ebdf7eafcad5e1efefa2e9d93a1beb3e4ff64a7824f543377baaf
   languageName: node
   linkType: hard
 
-"@metamask-institutional/custody-keyring@npm:^0.0.27":
-  version: 0.0.27
-  resolution: "@metamask-institutional/custody-keyring@npm:0.0.27"
+"@metamask-institutional/custody-keyring@npm:^1.0.3":
+  version: 1.0.3
+  resolution: "@metamask-institutional/custody-keyring@npm:1.0.3"
   dependencies:
     "@ethereumjs/tx": "npm:^4.1.1"
     "@ethereumjs/util": "npm:^8.0.5"
-    "@metamask-institutional/configuration-client": "npm:^1.0.6"
-    "@metamask-institutional/sdk": "npm:^0.1.18"
+    "@metamask-institutional/configuration-client": "npm:^2.0.0"
+    "@metamask-institutional/sdk": "npm:^0.1.19"
     "@metamask-institutional/types": "npm:^1.0.3"
     "@metamask/obs-store": "npm:^8.0.0"
     crypto: "npm:^1.0.1"
     lodash.clonedeep: "npm:^4.5.0"
-  checksum: f006671892e9abc3f72105a5276193f9194e54c51dd732affb632d1cf5d4cbfdc2c0b323e65b8265f1dedfb81dabd9ab2ce1e2c177ea5e791bd9af238b187336
+  checksum: 102accc2b807182f181fa9ed8839289b8f1582bbd267f39aa6fa1313080045e1074c2bc58145e0462e80f05ab8a24fdf1f9e6a7bb58653c8ec38606e3d8ef60f
   languageName: node
   linkType: hard
 
-"@metamask-institutional/extension@npm:^0.3.3":
-  version: 0.3.3
-  resolution: "@metamask-institutional/extension@npm:0.3.3"
+"@metamask-institutional/extension@npm:^0.3.7":
+  version: 0.3.7
+  resolution: "@metamask-institutional/extension@npm:0.3.7"
   dependencies:
     "@ethereumjs/util": "npm:^8.0.5"
-    "@metamask-institutional/custody-controller": "npm:^0.2.10"
-    "@metamask-institutional/custody-keyring": "npm:^0.0.27"
+    "@metamask-institutional/custody-controller": "npm:^0.2.14"
+    "@metamask-institutional/custody-keyring": "npm:^1.0.3"
     "@metamask-institutional/portfolio-dashboard": "npm:^1.4.0"
-    "@metamask-institutional/sdk": "npm:^0.1.18"
-    "@metamask-institutional/transaction-update": "npm:^0.1.25"
+    "@metamask-institutional/sdk": "npm:^0.1.19"
+    "@metamask-institutional/transaction-update": "npm:^0.1.29"
     "@metamask-institutional/types": "npm:^1.0.3"
     jest-create-mock-instance: "npm:^2.0.0"
     jest-fetch-mock: "npm:3.0.3"
-  checksum: cb19b44b686dfa08bee0764c7ac8ff782f4ada8439e17d63b96700e043f07c406c727d1abe1c5d32ba97ecdb394748c8ed93b8d6ee9d5fafa9c3d66f13aa108d
+  checksum: 628cbac88c1438bdee59d0cc0431cc1a091dc61e3f2f3aea8ae0d6bdb2d47a835098b39ed87bf77cb05066681fdc7636251ffecac7a8122d3ae9ba27a96860c9
   languageName: node
   linkType: hard
 
-"@metamask-institutional/institutional-features@npm:^1.2.2":
-  version: 1.2.2
-  resolution: "@metamask-institutional/institutional-features@npm:1.2.2"
+"@metamask-institutional/institutional-features@npm:^1.2.6":
+  version: 1.2.6
+  resolution: "@metamask-institutional/institutional-features@npm:1.2.6"
   dependencies:
-    "@metamask-institutional/custody-keyring": "npm:^0.0.27"
+    "@metamask-institutional/custody-keyring": "npm:^1.0.3"
     "@metamask/obs-store": "npm:^8.0.0"
-  checksum: 2eb4cd7d36e38ba89a11e22c8522e1a091572e171abec71b6fa7b28b0f54c7fec0cbeb238d1066112dfbaf70075529f37f5aae55d65fa2639a73597a222b65a6
+  checksum: 0a7b97dbfabaaff589172aa63429862c6a58ee8df0883ecd8758e11619de2d3e74e98cb91ce871dffba454eb1841d155ce386aae77789e2080cdcdea2840de19
   languageName: node
   linkType: hard
 
@@ -3698,17 +3698,17 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@metamask-institutional/sdk@npm:^0.1.18":
-  version: 0.1.18
-  resolution: "@metamask-institutional/sdk@npm:0.1.18"
+"@metamask-institutional/sdk@npm:^0.1.19":
+  version: 0.1.19
+  resolution: "@metamask-institutional/sdk@npm:0.1.19"
   dependencies:
     "@metamask-institutional/simplecache": "npm:^1.1.0"
     "@metamask-institutional/types": "npm:^1.0.3"
     "@types/jsonwebtoken": "npm:^9.0.1"
-    "@types/node": "npm:^18.15.11"
+    "@types/node": "npm:^20.4.2"
     bignumber.js: "npm:^9.1.1"
     jsonwebtoken: "npm:^9.0.0"
-  checksum: a554a2431caa4d9bb396cb19434a68a4a0a87eecfc5e7c0ed57b4d763eb5ac43563f002f90789f503ceec9c12534b727ad62a3d3feae4aea623eb35244be19aa
+  checksum: a73e77545ee5bfc0a56390184efa01e3f58830bff1bf8b787d0c43b70a382055563fcde313998ea8d18d808d0207228931d3cdc145e20ac9df6ca7abd79abfd3
   languageName: node
   linkType: hard
 
@@ -3719,17 +3719,17 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@metamask-institutional/transaction-update@npm:^0.1.25":
-  version: 0.1.25
-  resolution: "@metamask-institutional/transaction-update@npm:0.1.25"
+"@metamask-institutional/transaction-update@npm:^0.1.29":
+  version: 0.1.29
+  resolution: "@metamask-institutional/transaction-update@npm:0.1.29"
   dependencies:
-    "@metamask-institutional/custody-keyring": "npm:^0.0.27"
-    "@metamask-institutional/sdk": "npm:^0.1.18"
+    "@metamask-institutional/custody-keyring": "npm:^1.0.3"
+    "@metamask-institutional/sdk": "npm:^0.1.19"
     "@metamask-institutional/types": "npm:^1.0.3"
-    "@metamask-institutional/websocket-client": "npm:^0.1.27"
+    "@metamask-institutional/websocket-client": "npm:^0.1.31"
     "@metamask/obs-store": "npm:^8.0.0"
     ethereumjs-util: "npm:^7.1.5"
-  checksum: ee1c597a3e3ec3d226eb1a0cdda6ed3e098faab776eaeb30c5abbcf72efa4eceadbceefed51f6fc7fa92b45f02c0f0da732e2d600c13832d93f8ba449e4a31b5
+  checksum: 30885e530cb29228d5bca5b8b319a8ee6277cd4a4606677f88892f461f21fe26bce8a8a7139fe0b7e9911e4718a9210a5142498f39512379d408724c647504ce
   languageName: node
   linkType: hard
 
@@ -3740,15 +3740,15 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@metamask-institutional/websocket-client@npm:^0.1.27":
-  version: 0.1.27
-  resolution: "@metamask-institutional/websocket-client@npm:0.1.27"
+"@metamask-institutional/websocket-client@npm:^0.1.31":
+  version: 0.1.31
+  resolution: "@metamask-institutional/websocket-client@npm:0.1.31"
   dependencies:
-    "@metamask-institutional/custody-keyring": "npm:^0.0.27"
-    "@metamask-institutional/sdk": "npm:^0.1.18"
+    "@metamask-institutional/custody-keyring": "npm:^1.0.3"
+    "@metamask-institutional/sdk": "npm:^0.1.19"
     "@metamask-institutional/types": "npm:^1.0.3"
     mock-socket: "npm:^9.2.1"
-  checksum: e35e36f0ceae33596848539f8a6dff7bb5867124b7bceece61abc21e603ef81db4d0d3f182edcda8e62552d4870e1f3f527bc489e6412a5ae8d88909e5c64af5
+  checksum: 0776c4a24029eecbf6ca7b4ed1a97b88e0c2643baf819a6182d36654f81851f0ddbf8e29494574a191a0445acf9e9df2cc1225ee7979b1015b2a164ed8199156
   languageName: node
   linkType: hard
 
@@ -8139,10 +8139,10 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@types/node@npm:*, @types/node@npm:>=13.7.0":
-  version: 20.2.5
-  resolution: "@types/node@npm:20.2.5"
-  checksum: 37529473f00ee1042133abef58c9f9e92cd3b28f8d6cae3fabd09696dc86505bb6cdf3329403a5b23ccddbe589b8b7579b0b6d78ddfbeca856114d165af44ce5
+"@types/node@npm:*, @types/node@npm:>=13.7.0, @types/node@npm:^20.4.2":
+  version: 20.8.2
+  resolution: "@types/node@npm:20.8.2"
+  checksum: 61bd39870625d8afcbb4f21d6a0c3a9681f6d508dc6b06f2497e9ad3ec942092a120bcfdbc1757a8e4017308449bc2a9b9865b2b9840b158878a4e8cc0804a3c
   languageName: node
   linkType: hard
 
@@ -8160,13 +8160,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@types/node@npm:^18.15.11":
-  version: 18.16.16
-  resolution: "@types/node@npm:18.16.16"
-  checksum: de89394eae62000f2df988b37928cbeefc1407a50060aee8d1ac9c5e11d01be8305c1e14fc26d80f262f352e60c961b82a00bbafca181d3717a7ce52336cb2bd
-  languageName: node
-  linkType: hard
-
 "@types/normalize-package-data@npm:^2.4.0":
   version: 2.4.0
   resolution: "@types/normalize-package-data@npm:2.4.0"
@@ -24173,14 +24166,14 @@ __metadata:
     "@lavamoat/lavapack": "npm:^5.2.4"
     "@lavamoat/snow": "npm:^1.5.0"
     "@material-ui/core": "npm:^4.11.0"
-    "@metamask-institutional/custody-controller": "npm:^0.2.10"
-    "@metamask-institutional/custody-keyring": "npm:^0.0.27"
-    "@metamask-institutional/extension": "npm:^0.3.3"
-    "@metamask-institutional/institutional-features": "npm:^1.2.2"
+    "@metamask-institutional/custody-controller": "npm:^0.2.14"
+    "@metamask-institutional/custody-keyring": "npm:^1.0.3"
+    "@metamask-institutional/extension": "npm:^0.3.7"
+    "@metamask-institutional/institutional-features": "npm:^1.2.6"
     "@metamask-institutional/portfolio-dashboard": "npm:^1.4.0"
     "@metamask-institutional/rpc-allowlist": "npm:^1.0.0"
-    "@metamask-institutional/sdk": "npm:^0.1.18"
-    "@metamask-institutional/transaction-update": "npm:^0.1.25"
+    "@metamask-institutional/sdk": "npm:^0.1.19"
+    "@metamask-institutional/transaction-update": "npm:^0.1.29"
     "@metamask/address-book-controller": "npm:^3.0.0"
     "@metamask/announcement-controller": "npm:^4.0.0"
     "@metamask/approval-controller": "npm:^3.4.0"

From 38a638d3f6fbe32c0109d5e441d54b0288d9f28a Mon Sep 17 00:00:00 2001
From: Dan J Miller <danjm.com@gmail.com>
Date: Tue, 3 Oct 2023 16:18:12 -0230
Subject: [PATCH 3/7] Add lavamoat policy and yarn version changes need for
 v11.1.2

---
 lavamoat/browserify/mmi/policy.json | 58 +++++++++++++++++++++++++++--
 package.json                        |  4 +-
 yarn.lock                           | 42 +++++++++++++++++++--
 3 files changed, 95 insertions(+), 9 deletions(-)

diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json
index 81b35a5c7bf4..ea4541e50fad 100644
--- a/lavamoat/browserify/mmi/policy.json
+++ b/lavamoat/browserify/mmi/policy.json
@@ -761,22 +761,72 @@
     },
     "@metamask-institutional/extension": {
       "globals": {
-        "console.log": true,
-        "fetch": true
+        "console.log": true
       },
       "packages": {
         "@ethereumjs/tx>@ethereumjs/util": true,
-        "@metamask-institutional/custody-controller": true,
+        "@metamask-institutional/extension>@metamask-institutional/custody-controller": true,
         "@metamask-institutional/sdk": true,
         "@metamask-institutional/sdk>@metamask-institutional/types": true
       }
     },
+    "@metamask-institutional/extension>@metamask-institutional/custody-controller": {
+      "packages": {
+        "@ethereumjs/tx>@ethereumjs/util": true,
+        "@metamask-institutional/extension>@metamask-institutional/custody-keyring": true,
+        "@metamask/obs-store": true
+      }
+    },
+    "@metamask-institutional/extension>@metamask-institutional/custody-keyring": {
+      "globals": {
+        "console.log": true,
+        "console.warn": true
+      },
+      "packages": {
+        "@ethereumjs/tx>@ethereumjs/util": true,
+        "@metamask-institutional/extension>@metamask-institutional/custody-keyring>@metamask-institutional/configuration-client": true,
+        "@metamask-institutional/sdk": true,
+        "@metamask-institutional/sdk>@metamask-institutional/types": true,
+        "@metamask/obs-store": true,
+        "browserify>crypto-browserify": true,
+        "browserify>events": true,
+        "gulp-sass>lodash.clonedeep": true
+      }
+    },
+    "@metamask-institutional/extension>@metamask-institutional/custody-keyring>@metamask-institutional/configuration-client": {
+      "globals": {
+        "console.log": true,
+        "fetch": true
+      }
+    },
     "@metamask-institutional/institutional-features": {
       "packages": {
-        "@metamask-institutional/custody-keyring": true,
+        "@metamask-institutional/institutional-features>@metamask-institutional/custody-keyring": true,
         "@metamask/obs-store": true
       }
     },
+    "@metamask-institutional/institutional-features>@metamask-institutional/custody-keyring": {
+      "globals": {
+        "console.log": true,
+        "console.warn": true
+      },
+      "packages": {
+        "@ethereumjs/tx>@ethereumjs/util": true,
+        "@metamask-institutional/institutional-features>@metamask-institutional/custody-keyring>@metamask-institutional/configuration-client": true,
+        "@metamask-institutional/sdk": true,
+        "@metamask-institutional/sdk>@metamask-institutional/types": true,
+        "@metamask/obs-store": true,
+        "browserify>crypto-browserify": true,
+        "browserify>events": true,
+        "gulp-sass>lodash.clonedeep": true
+      }
+    },
+    "@metamask-institutional/institutional-features>@metamask-institutional/custody-keyring>@metamask-institutional/configuration-client": {
+      "globals": {
+        "console.log": true,
+        "fetch": true
+      }
+    },
     "@metamask-institutional/portfolio-dashboard": {
       "globals": {
         "console.log": true,
diff --git a/package.json b/package.json
index 31db0ad05e1f..8958f268505a 100644
--- a/package.json
+++ b/package.json
@@ -223,8 +223,8 @@
     "@keystonehq/metamask-airgapped-keyring": "^0.13.1",
     "@lavamoat/snow": "^1.5.0",
     "@material-ui/core": "^4.11.0",
-    "@metamask-institutional/custody-controller": "^0.2.14",
-    "@metamask-institutional/custody-keyring": "^1.0.3",
+    "@metamask-institutional/custody-controller": "0.2.10",
+    "@metamask-institutional/custody-keyring": "0.0.27",
     "@metamask-institutional/extension": "^0.3.7",
     "@metamask-institutional/institutional-features": "^1.2.6",
     "@metamask-institutional/portfolio-dashboard": "^1.4.0",
diff --git a/yarn.lock b/yarn.lock
index 11b3bcfd18c6..d2fe0079d17f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3628,6 +3628,26 @@ __metadata:
   languageName: node
   linkType: hard
 
+"@metamask-institutional/configuration-client@npm:^2.0.0":
+  version: 2.0.0
+  resolution: "@metamask-institutional/configuration-client@npm:2.0.0"
+  checksum: 58856e9d2676110aede32d506d0c0602c4b9940bc810a1b7834ded52407f321d64bba08ce55de3e4be29dfc4e9d492ce1ee0fbab72b150c8e86feb8d99570699
+  languageName: node
+  linkType: hard
+
+"@metamask-institutional/custody-controller@npm:0.2.10":
+  version: 0.2.10
+  resolution: "@metamask-institutional/custody-controller@npm:0.2.10"
+  dependencies:
+    "@ethereumjs/util": "npm:^8.0.5"
+    "@metamask-institutional/custody-keyring": "npm:^0.0.27"
+    "@metamask-institutional/sdk": "npm:^0.1.18"
+    "@metamask-institutional/types": "npm:^1.0.3"
+    "@metamask/obs-store": "npm:^8.0.0"
+  checksum: 4ab4c26649f7e7e6e37308b00b2aa21cf40c0a861435a54c49bf0e092b49cbef71189774bd8ca038ace57d561facb8f79a0d98ad55ef0196101a857508e447d9
+  languageName: node
+  linkType: hard
+
 "@metamask-institutional/custody-controller@npm:^0.2.14":
   version: 0.2.14
   resolution: "@metamask-institutional/custody-controller@npm:0.2.14"
@@ -3641,6 +3661,22 @@ __metadata:
   languageName: node
   linkType: hard
 
+"@metamask-institutional/custody-keyring@npm:0.0.27, @metamask-institutional/custody-keyring@npm:^0.0.27":
+  version: 0.0.27
+  resolution: "@metamask-institutional/custody-keyring@npm:0.0.27"
+  dependencies:
+    "@ethereumjs/tx": "npm:^4.1.1"
+    "@ethereumjs/util": "npm:^8.0.5"
+    "@metamask-institutional/configuration-client": "npm:^1.0.6"
+    "@metamask-institutional/sdk": "npm:^0.1.18"
+    "@metamask-institutional/types": "npm:^1.0.3"
+    "@metamask/obs-store": "npm:^8.0.0"
+    crypto: "npm:^1.0.1"
+    lodash.clonedeep: "npm:^4.5.0"
+  checksum: f006671892e9abc3f72105a5276193f9194e54c51dd732affb632d1cf5d4cbfdc2c0b323e65b8265f1dedfb81dabd9ab2ce1e2c177ea5e791bd9af238b187336
+  languageName: node
+  linkType: hard
+
 "@metamask-institutional/custody-keyring@npm:^1.0.3":
   version: 1.0.3
   resolution: "@metamask-institutional/custody-keyring@npm:1.0.3"
@@ -3698,7 +3734,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@metamask-institutional/sdk@npm:^0.1.19":
+"@metamask-institutional/sdk@npm:^0.1.18, @metamask-institutional/sdk@npm:^0.1.19":
   version: 0.1.19
   resolution: "@metamask-institutional/sdk@npm:0.1.19"
   dependencies:
@@ -24166,8 +24202,8 @@ __metadata:
     "@lavamoat/lavapack": "npm:^5.2.4"
     "@lavamoat/snow": "npm:^1.5.0"
     "@material-ui/core": "npm:^4.11.0"
-    "@metamask-institutional/custody-controller": "npm:^0.2.14"
-    "@metamask-institutional/custody-keyring": "npm:^1.0.3"
+    "@metamask-institutional/custody-controller": "npm:0.2.10"
+    "@metamask-institutional/custody-keyring": "npm:0.0.27"
     "@metamask-institutional/extension": "npm:^0.3.7"
     "@metamask-institutional/institutional-features": "npm:^1.2.6"
     "@metamask-institutional/portfolio-dashboard": "npm:^1.4.0"

From 746c279864dfbf5b1bb9312ad1b40d7986aa5b1c Mon Sep 17 00:00:00 2001
From: Dan J Miller <danjm.com@gmail.com>
Date: Tue, 3 Oct 2023 16:19:45 -0230
Subject: [PATCH 4/7] Add UI change needed for v11.1.2 which was part of
 452e177 (PR #20982)

---
 ui/pages/institutional/custody/custody.js | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/ui/pages/institutional/custody/custody.js b/ui/pages/institutional/custody/custody.js
index 1f017e90a9bd..7cfc76bbc1e5 100644
--- a/ui/pages/institutional/custody/custody.js
+++ b/ui/pages/institutional/custody/custody.js
@@ -597,8 +597,11 @@ const CustodyPage = () => {
                 history.push({
                   pathname: CUSTODY_ACCOUNT_DONE_ROUTE,
                   state: {
-                    imgSrc: selectedCustodian.iconUrl,
-                    title: t('custodianAccountAddedTitle'),
+                    imgSrc: selectedCustodian && selectedCustodian.iconUrl,
+                    title: t('custodianAccountAddedTitle', [
+                      (selectedCustodian && selectedCustodian.displayName) ||
+                        'Custodian',
+                    ]),
                     description: t('custodianAccountAddedDesc'),
                   },
                 });
@@ -615,9 +618,7 @@ const CustodyPage = () => {
               setApiUrl('');
               setAddNewTokenClicked(false);
 
-              if (Object.keys(connectRequest).length) {
-                history.push(DEFAULT_ROUTE);
-              }
+              history.push(DEFAULT_ROUTE);
 
               trackEvent({
                 category: MetaMetricsEventCategory.MMI,

From eca4bb21a33b347c2bc48d89200d6ed57646d8de Mon Sep 17 00:00:00 2001
From: Brad Decker <bhdecker84@gmail.com>
Date: Tue, 3 Oct 2023 20:45:10 -0500
Subject: [PATCH 5/7] fix(#21175): safe access of image (#21176)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

## **Description**
Fixes #21175 . Found a regression during personal usage of the
extension. @jiexi already fixed this in a PR #20916 to update the
assets-controller but this single line change is being pulled forward
for a hotfix

## **Manual testing steps**
Use steps from issue which are:
1. Install the extension (develop and then this branch)
2. Import a wallet with NFTs
3. Enable autodetection and open sea
4. See the homescreen won't load and error is cannot access startsWith
of undefined. On this branch that is resolved

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained:
  - [x] What problem this PR is solving.
  - [x] How this problem was solved.
  - [x] How reviewers can test my changes.
- [x] I’ve indicated what issue this PR is linked to: Fixes #???
- [ ] I’ve included tests if applicable.
- [ ] I’ve documented any added code.
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
- [x] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **Pre-merge reviewer checklist**

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
---
 ui/components/app/nfts-items/nfts-items.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/components/app/nfts-items/nfts-items.js b/ui/components/app/nfts-items/nfts-items.js
index d2e5eeb6630d..ced4c8f5a897 100644
--- a/ui/components/app/nfts-items/nfts-items.js
+++ b/ui/components/app/nfts-items/nfts-items.js
@@ -192,7 +192,7 @@ export default function NftsItems({
                 ipfsGateway,
               );
               const nftImageAlt = getNftImageAlt(nft);
-              const isImageHosted = image.startsWith('https:');
+              const isImageHosted = image?.startsWith('https:');
               const nftImageURL = imageOriginal?.startsWith('ipfs')
                 ? nftImage
                 : image;

From 7b503ec67725dffd73b6363566a6de11ff5b10f8 Mon Sep 17 00:00:00 2001
From: Dan J Miller <danjm.com@gmail.com>
Date: Tue, 3 Oct 2023 22:52:58 -0230
Subject: [PATCH 6/7] Revert test additions from 16a0d16ea (#21177)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

## **Description**
As part of PR https://github.com/MetaMask/metamask-extension/pull/21033,
I made commit 16a0d16ea

This introduced a test assertion that fails periodically on firefox. It
consistently passes on chrome in CI, and passes when I run locally in
firefox and chrome. I have not been able to properly debug why these
additions were flaky.

In the interests of removing friction from our build and release flows,
I am going to revert those changes for now, and then we can further
investigate later (issue for that is here
https://github.com/MetaMask/metamask-extension/issues/21178)

## **Manual testing steps**

e2e tests should pass, no manual tests needed.

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained:
  - [x] What problem this PR is solving.
  - [x] How this problem was solved.
  - [x] How reviewers can test my changes.
- [ ] I’ve indicated what issue this PR is linked to: Fixes #???
- [ ] I’ve included tests if applicable.
- [ ] I’ve documented any added code.
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
- [ ] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
---
 test/e2e/tests/ipfs-toggle.spec.js | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/test/e2e/tests/ipfs-toggle.spec.js b/test/e2e/tests/ipfs-toggle.spec.js
index d6634ea3729a..149442b4ce91 100644
--- a/test/e2e/tests/ipfs-toggle.spec.js
+++ b/test/e2e/tests/ipfs-toggle.spec.js
@@ -33,10 +33,6 @@ describe('Settings', function () {
           '.settings-page__header__title-container__close-button',
         );
         await driver.clickElement('[data-testid="home__nfts-tab"]');
-        const nftDefaultImage1 = await driver.findElement(
-          '[data-testid=nft-default-image]',
-        );
-        assert.equal(await nftDefaultImage1.isDisplayed(), true);
         const importedNftImage = await driver.findVisibleElement(
           '.nft-item__container',
         );
@@ -63,13 +59,6 @@ describe('Settings', function () {
         // should render image now
         const nftImage = await driver.findElement('[data-testid="nft-image"]');
         assert.equal(await nftImage.isDisplayed(), true);
-
-        await driver.clickElement('[data-testid="asset__back"]');
-        await driver.clickElement('[data-testid="home__nfts-tab"]');
-        await driver.clickElement('[data-testid="collection-expander-button"]');
-
-        const nftImage2 = await driver.findElement('[data-testid=nft-image]');
-        assert.equal(await nftImage2.isDisplayed(), true);
       },
     );
   });

From 88197b68d7dee019f2911134e443145cb808c66a Mon Sep 17 00:00:00 2001
From: Dan J Miller <danjm.com@gmail.com>
Date: Wed, 4 Oct 2023 08:11:04 -0230
Subject: [PATCH 7/7] Ignored ripple-lib deprecation advisory, as we do not
 depend on it in MetaMask (#21182)

## **Description**
This PR addresses a `yarn audit` failure that we currently see on
develop. The failure is due to the deprecation of the `ripple-lib`
library used within `@trezor/blockchain-link@npm:2.1.8`. Although
imported in one of our dependencies, MetaMask does not depend on that
library, and it's code is not used by our codebase. We can safely ignore
this advisory.

## **Manual testing steps**

Not needed. Builds should pass without a `yarn audit` warning
---
 .yarnrc.yml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/.yarnrc.yml b/.yarnrc.yml
index ddac0d46647c..eab0fabc76d6 100644
--- a/.yarnrc.yml
+++ b/.yarnrc.yml
@@ -94,6 +94,10 @@ npmAuditIgnoreAdvisories:
   # @types/webextension-polyfill
   - 'webextension-polyfill-ts (deprecation)'
 
+  # Imported in @trezor/blockchain-link@npm:2.1.8, but not actually depended on
+  # by MetaMask
+  - 'ripple-lib (deprecation)'
+
 npmRegistries:
   'https://npm.pkg.github.com':
     npmAlwaysAuth: true