Skip to content

Commit

Permalink
Update accounts-controller patch to fix failing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorLift committed Mar 9, 2024
1 parent d71a6d2 commit 4c635e2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
diff --git a/dist/utils.js b/dist/utils.js
index 0a77dd709e786ee586b70677fa951f34d5097e34..dbb30f1116fc7c9f174548836c2d6d4e15049253 100644
index 0a77dd709e786ee586b70677fa951f34d5097e34..24dbc12c31686a3ad1b78de702801e19a239f0fc 100644
--- a/dist/utils.js
+++ b/dist/utils.js
@@ -12,11 +12,11 @@ const uuid_1 = require("uuid");
* @returns The name of the keyring type.
*/
function keyringTypeToName(keyringType) {
- // Custody keyrings are a special case, as they are not a single type
- // they just start with the prefix `Custody`
- if ((0, keyring_controller_1.isCustodyKeyring)(keyringType)) {
+ // Custody Keyrings follow this pattern
+ if (/^Custody.*/.test(keyringType)) {
return 'Custody';
}
+
switch (keyringType) {
case keyring_controller_1.KeyringTypes.simple: {
return 'Account';
@@ -39,6 +39,9 @@ function keyringTypeToName(keyringType) {
case keyring_controller_1.KeyringTypes.snap: {
return 'Snap Account';
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3856,7 +3856,7 @@ __metadata:

"@metamask/accounts-controller@patch:@metamask/accounts-controller@npm%3A11.0.0#~/.yarn/patches/@metamask-accounts-controller-npm-11.0.0-c67f9a2901.patch":
version: 11.0.0
resolution: "@metamask/accounts-controller@patch:@metamask/accounts-controller@npm%3A11.0.0#~/.yarn/patches/@metamask-accounts-controller-npm-11.0.0-c67f9a2901.patch::version=11.0.0&hash=8f0fbf"
resolution: "@metamask/accounts-controller@patch:@metamask/accounts-controller@npm%3A11.0.0#~/.yarn/patches/@metamask-accounts-controller-npm-11.0.0-c67f9a2901.patch::version=11.0.0&hash=716e41"
dependencies:
"@ethereumjs/util": "npm:^8.1.0"
"@metamask/base-controller": "npm:^4.1.1"
Expand All @@ -3872,7 +3872,7 @@ __metadata:
peerDependencies:
"@metamask/keyring-controller": ^13.0.0
"@metamask/snaps-controllers": ^4.0.0
checksum: c3e26b9642321dabba6a0f9207e06fb33fbc511601ef55ff44aeae0e7b95a2f61fb58bd9e343dd3735a5d3480ec3e0920a5386ad3b4c6d591523dae8fd3815e3
checksum: b0ba19b96c7dd4cfdeb5adb1d6c66e3109c5278ef2fbd104bc2ca575b67bcbb2e48d6273b105760cc5eea0464da1f443ac95c5275a44d42059868cd904bf8a3b
languageName: node
linkType: hard

Expand Down

0 comments on commit 4c635e2

Please sign in to comment.