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

feat: add scopes field to KeyringAccount #29195

Merged
merged 77 commits into from
Jan 21, 2025
Merged

Conversation

ccharly
Copy link
Contributor

@ccharly ccharly commented Dec 13, 2024

Description

Testing the new scopes added on the KeyringAccount.

Open in GitHub Codespaces

Related issues

Requires this PR to be merged first:

Related to:

Manual testing steps

  • Use a previous stable version
git checkout Version-v12.10.0 # Or use a release build
  • Run it:
yarn
yarn start:flask
  • Create a bunch of accounts (EVM, non-EVM (Solana/Bitcoin), hardware-wallet, Snap EVM accounts like the SSK)

Screenshot 2025-01-16 at 17 11 55

  • Save your extension logs (Settings > Advanced)
  • Now disable your extension (chrome://extensions)
  • Stops your yarn start:flask
  • Now, update your extension by going back to this PR (or by using the latest RC if you're validating an RC version)
git checkout feat/keyring-account-scopes
  • Re-run it:
yarn
yarn start:flask
  • Re-enable your extension (chrome://extensions)
  • Open up your console logs (looking at the service worker)
  • You should now see some migrations running like:

Screenshot 2025-01-16 at 17 14 03

  • You should also see some other migrations from the Snap keyring this like so:

Screenshot 2025-01-16 at 18 52 48

  • Save your extension logs again (Settings > Advanced, and use a different filename)
  • Now, compare your 2 .json files

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

Copy link
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.

@ccharly ccharly force-pushed the feat/keyring-account-scopes branch from d1cc825 to 81c5c8f Compare December 13, 2024 11:36
@ccharly ccharly changed the title Feat/keyring account scopes feat(keyring-api)!: add scopes field to KeyringAccount Dec 13, 2024
@ccharly ccharly force-pushed the feat/keyring-account-scopes branch from ecb5bc1 to 3a72085 Compare December 13, 2024 17:12
@ccharly ccharly force-pushed the feat/keyring-account-scopes branch from f8e088a to c70c99a Compare January 17, 2025 11:42
@ccharly ccharly marked this pull request as ready for review January 17, 2025 12:58
@metamaskbot
Copy link
Collaborator

Builds ready [9e94e59]
Page Load Metrics (1782 ± 107 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint154424461781228110
domContentLoaded153323731752219105
load154524471782224107
domInteractive21204554521
backgroundConnect798292512
firstReactRender1698412713
getState593202412
initialActions00000
loadScripts11211787130817684
setupStore66613157
uiStartup175327202032263126
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -38.65 KiB (-0.65%)
  • ui: 0 Bytes (0.00%)
  • common: -73.09 KiB (-0.84%)

darioAnongba
darioAnongba previously approved these changes Jan 17, 2025
@gantunesr
Copy link
Member

gantunesr commented Jan 20, 2025

Manual tested the migration test case:

  1. Logs reported as expected

Screenshot 2025-01-20 at 9 03 58 AM

Screenshot 2025-01-20 at 9 04 19 AM

  1. State updated as expected
Initial state
"internalAccounts": {
  "accounts": {
    "3b61f8b2-9a9a-4954-b8da-f829b9092ee7": {
      "id": "3b61f8b2-9a9a-4954-b8da-f829b9092ee7",
      "address": "0xc5b2b5ae370876c0122910f92a13bef85a133e56",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Account 1",
        "importTime": 1737373698776,
        "lastSelected": 1737373698776,
        "keyring": {
          "type": "HD Key Tree"
        }
      }
    },
    "d2e1a3b0-dedf-4fa5-85d0-aa4fedfb2b32": {
      "id": "d2e1a3b0-dedf-4fa5-85d0-aa4fedfb2b32",
      "address": "0x9491938151d774cf46ad422f28b75ab3364a7240",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Account 2",
        "importTime": 1737373703412,
        "lastSelected": 0,
        "keyring": {
          "type": "HD Key Tree"
        }
      }
    },
    "c401e0e4-8c48-4406-8e6a-a5de2ffd998f": {
      "id": "c401e0e4-8c48-4406-8e6a-a5de2ffd998f",
      "address": "0x79821ea7ab5c5a34a24b2fd547c544ac15a7b121",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Account 3",
        "importTime": 1737373703583,
        "lastSelected": 0,
        "keyring": {
          "type": "HD Key Tree"
        }
      }
    },
    "d28b8763-ce68-4a71-91f1-85d6fb8187d6": {
      "id": "d28b8763-ce68-4a71-91f1-85d6fb8187d6",
      "address": "0xdf8c8269f35274c5ba5c18f091407c8b1c29d7b1",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Account 4",
        "importTime": 1737373703748,
        "lastSelected": 0,
        "keyring": {
          "type": "HD Key Tree"
        }
      }
    },
    "43538253-4d95-4da4-adc0-9a256b0ffff9": {
      "id": "43538253-4d95-4da4-adc0-9a256b0ffff9",
      "address": "0x5ea510e7e1d3b3d4ec9e0615893b6552479b9d52",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Account 5",
        "importTime": 1737373703922,
        "lastSelected": 0,
        "keyring": {
          "type": "HD Key Tree"
        }
      }
    },
    "2ea26aa9-69c6-4d53-88ea-f65b6781ed18": {
      "id": "2ea26aa9-69c6-4d53-88ea-f65b6781ed18",
      "address": "0x28f9c91ef587099460642ac1ad9785aa711b98ad",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Account 6",
        "importTime": 1737373704094,
        "lastSelected": 0,
        "keyring": {
          "type": "HD Key Tree"
        }
      }
    },
    "725c20d2-abdb-464e-9952-23a0783ee71d": {
      "id": "725c20d2-abdb-464e-9952-23a0783ee71d",
      "address": "0x194cca48fe7eb9e1786ea15f6bd2674c38b1827e",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Account 7",
        "importTime": 1737373706290,
        "lastSelected": 0,
        "keyring": {
          "type": "HD Key Tree"
        }
      }
    },
    "fffcfee3-ca32-4e3a-9772-f0da52ad7d6f": {
      "type": "bip122:p2wpkh",
      "id": "fffcfee3-ca32-4e3a-9772-f0da52ad7d6f",
      "address": "bc1qq4c8nqyu7hqvl9z85kj0m7p8adfnggt9lwp4lx",
      "options": {
        "scope": "bip122:000000000019d6689c085ae165831e93",
        "index": 0
      },
      "methods": [
        "sendBitcoin"
      ],
      "metadata": {
        "name": "Bitcoin Account",
        "importTime": 1737373980982,
        "keyring": {
          "type": "Snap Keyring"
        },
        "snap": {
          "id": "npm:@metamask/bitcoin-wallet-snap",
          "name": "Bitcoin",
          "enabled": true
        },
        "lastSelected": 1737373980995
      }
    },
    "9efc9170-7a0e-4039-a2d5-91ee21344027": {
      "type": "bip122:p2wpkh",
      "id": "9efc9170-7a0e-4039-a2d5-91ee21344027",
      "address": "tb1q2uh98jcgv7kj2n6683rl8mc0e42ks45xjnggej",
      "options": {
        "scope": "bip122:000000000933ea01ad0ee984209779ba",
        "index": 0
      },
      "methods": [
        "sendBitcoin"
      ],
      "metadata": {
        "name": "Bitcoin Testnet Account",
        "importTime": 1737373988986,
        "keyring": {
          "type": "Snap Keyring"
        },
        "snap": {
          "id": "npm:@metamask/bitcoin-wallet-snap",
          "name": "Bitcoin",
          "enabled": true
        },
        "lastSelected": 1737373989000
      }
    },
    "8502ef9f-9e73-4a88-beef-6c686d25c1b7": {
      "type": "solana:data-account",
      "id": "8502ef9f-9e73-4a88-beef-6c686d25c1b7",
      "address": "7rNDaLreKMEDG9vBYPWvjDLX3LU4tEbMPEN6pTxdGVNL",
      "options": {
        "scope": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"
      },
      "methods": [
        "sendAndConfirmTransaction"
      ],
      "metadata": {
        "name": "Solana Account 1",
        "importTime": 1737373995496,
        "keyring": {
          "type": "Snap Keyring"
        },
        "snap": {
          "id": "npm:@metamask/solana-wallet-snap",
          "name": "Solana",
          "enabled": true
        },
        "lastSelected": 1737373995510
      }
    },
    "bd2e74e3-30d1-40c8-90d9-4e2f6cde4e46": {
      "id": "bd2e74e3-30d1-40c8-90d9-4e2f6cde4e46",
      "options": {},
      "address": "0xe9c53207e3dc5a59dba0b7e5fa946030e39eaff7",
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "SSK Account",
        "importTime": 1737374023616,
        "keyring": {
          "type": "Snap Keyring"
        },
        "snap": {
          "id": "npm:@metamask/snap-simple-keyring-snap",
          "name": "MetaMask Simple Snap Keyring",
          "enabled": true
        },
        "lastSelected": 1737374023633
      }
    },
    "81d94ebd-13ab-45d0-ae2e-a27798ab16b1": {
      "id": "81d94ebd-13ab-45d0-ae2e-a27798ab16b1",
      "options": {},
      "address": "0x8c8443089057dfea92546b2422641afd7632ca35",
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "SSK Account 2",
        "importTime": 1737374027656,
        "keyring": {
          "type": "Snap Keyring"
        },
        "snap": {
          "id": "npm:@metamask/snap-simple-keyring-snap",
          "name": "MetaMask Simple Snap Keyring",
          "enabled": true
        },
        "lastSelected": 1737374027674
      }
    },
    "05e5a618-ec82-45fb-a1c6-aa58c64d36f0": {
      "id": "05e5a618-ec82-45fb-a1c6-aa58c64d36f0",
      "options": {},
      "address": "0xb5e9ee46e6a61b688ed2be8de16975bc81f1d3da",
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "SSK Account 3",
        "importTime": 1737374034228,
        "keyring": {
          "type": "Snap Keyring"
        },
        "snap": {
          "id": "npm:@metamask/snap-simple-keyring-snap",
          "name": "MetaMask Simple Snap Keyring",
          "enabled": true
        },
        "lastSelected": 1737374034248,
        "nameLastUpdatedAt": 1737374034249
      }
    },
    "179f9fbf-7b26-4592-8493-dbafcfa83e4c": {
      "id": "179f9fbf-7b26-4592-8493-dbafcfa83e4c",
      "address": "0xeae1dfdf3c9cda4d52a452716950b41eea864c5e",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Ledger 1",
        "importTime": 1737374151129,
        "keyring": {
          "type": "Ledger Hardware"
        },
        "lastSelected": 1737374151133,
        "nameLastUpdatedAt": 1737374151133
      }
    },
    "a4a41a3d-13d9-4ef3-be2f-aa28f47879aa": {
      "id": "a4a41a3d-13d9-4ef3-be2f-aa28f47879aa",
      "address": "0x3a3fc52253e62cf4f3573814aa410736c9db5d0c",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Ledger 2",
        "importTime": 1737374151651,
        "keyring": {
          "type": "Ledger Hardware"
        },
        "lastSelected": 1737374151656,
        "nameLastUpdatedAt": 1737374151656
      }
    },
    "8c028de9-0094-44af-be0a-335ded0c6117": {
      "id": "8c028de9-0094-44af-be0a-335ded0c6117",
      "address": "0x91db5ca06149ace5ac5a476020ded0eb5b9d21c7",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Ledger 3",
        "importTime": 1737374152169,
        "keyring": {
          "type": "Ledger Hardware"
        },
        "lastSelected": 1737374152174,
        "nameLastUpdatedAt": 1737374152174
      }
    }
  },
  "selectedAccount": "8c028de9-0094-44af-be0a-335ded0c6117"
},
After migration state state
"internalAccounts": {
  "accounts": {
    "3b61f8b2-9a9a-4954-b8da-f829b9092ee7": {
      "id": "3b61f8b2-9a9a-4954-b8da-f829b9092ee7",
      "address": "0xc5b2b5ae370876c0122910f92a13bef85a133e56",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "scopes": [
        "eip155"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Account 1",
        "importTime": 1737373698776,
        "lastSelected": 1737373698776,
        "keyring": {
          "type": "HD Key Tree"
        }
      }
    },
    "d2e1a3b0-dedf-4fa5-85d0-aa4fedfb2b32": {
      "id": "d2e1a3b0-dedf-4fa5-85d0-aa4fedfb2b32",
      "address": "0x9491938151d774cf46ad422f28b75ab3364a7240",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "scopes": [
        "eip155"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Account 2",
        "importTime": 1737373703412,
        "lastSelected": 0,
        "keyring": {
          "type": "HD Key Tree"
        }
      }
    },
    "c401e0e4-8c48-4406-8e6a-a5de2ffd998f": {
      "id": "c401e0e4-8c48-4406-8e6a-a5de2ffd998f",
      "address": "0x79821ea7ab5c5a34a24b2fd547c544ac15a7b121",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "scopes": [
        "eip155"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Account 3",
        "importTime": 1737373703583,
        "lastSelected": 0,
        "keyring": {
          "type": "HD Key Tree"
        }
      }
    },
    "d28b8763-ce68-4a71-91f1-85d6fb8187d6": {
      "id": "d28b8763-ce68-4a71-91f1-85d6fb8187d6",
      "address": "0xdf8c8269f35274c5ba5c18f091407c8b1c29d7b1",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "scopes": [
        "eip155"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Account 4",
        "importTime": 1737373703748,
        "lastSelected": 0,
        "keyring": {
          "type": "HD Key Tree"
        }
      }
    },
    "43538253-4d95-4da4-adc0-9a256b0ffff9": {
      "id": "43538253-4d95-4da4-adc0-9a256b0ffff9",
      "address": "0x5ea510e7e1d3b3d4ec9e0615893b6552479b9d52",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "scopes": [
        "eip155"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Account 5",
        "importTime": 1737373703922,
        "lastSelected": 0,
        "keyring": {
          "type": "HD Key Tree"
        }
      }
    },
    "2ea26aa9-69c6-4d53-88ea-f65b6781ed18": {
      "id": "2ea26aa9-69c6-4d53-88ea-f65b6781ed18",
      "address": "0x28f9c91ef587099460642ac1ad9785aa711b98ad",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "scopes": [
        "eip155"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Account 6",
        "importTime": 1737373704094,
        "lastSelected": 0,
        "keyring": {
          "type": "HD Key Tree"
        }
      }
    },
    "725c20d2-abdb-464e-9952-23a0783ee71d": {
      "id": "725c20d2-abdb-464e-9952-23a0783ee71d",
      "address": "0x194cca48fe7eb9e1786ea15f6bd2674c38b1827e",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "scopes": [
        "eip155"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Account 7",
        "importTime": 1737373706290,
        "lastSelected": 0,
        "keyring": {
          "type": "HD Key Tree"
        }
      }
    },
    "179f9fbf-7b26-4592-8493-dbafcfa83e4c": {
      "id": "179f9fbf-7b26-4592-8493-dbafcfa83e4c",
      "address": "0xeae1dfdf3c9cda4d52a452716950b41eea864c5e",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "scopes": [
        "eip155"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Ledger 1",
        "nameLastUpdatedAt": 1737374151133,
        "importTime": 1737374151129,
        "lastSelected": 1737374151133,
        "keyring": {
          "type": "Ledger Hardware"
        }
      }
    },
    "a4a41a3d-13d9-4ef3-be2f-aa28f47879aa": {
      "id": "a4a41a3d-13d9-4ef3-be2f-aa28f47879aa",
      "address": "0x3a3fc52253e62cf4f3573814aa410736c9db5d0c",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "scopes": [
        "eip155"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Ledger 2",
        "nameLastUpdatedAt": 1737374151656,
        "importTime": 1737374151651,
        "lastSelected": 1737374151656,
        "keyring": {
          "type": "Ledger Hardware"
        }
      }
    },
    "8c028de9-0094-44af-be0a-335ded0c6117": {
      "id": "8c028de9-0094-44af-be0a-335ded0c6117",
      "address": "0x91db5ca06149ace5ac5a476020ded0eb5b9d21c7",
      "options": {},
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "scopes": [
        "eip155"
      ],
      "type": "eip155:eoa",
      "metadata": {
        "name": "Ledger 3",
        "nameLastUpdatedAt": 1737374152174,
        "importTime": 1737374152169,
        "lastSelected": 1737374152174,
        "keyring": {
          "type": "Ledger Hardware"
        }
      }
    },
    "fffcfee3-ca32-4e3a-9772-f0da52ad7d6f": {
      "type": "bip122:p2wpkh",
      "id": "fffcfee3-ca32-4e3a-9772-f0da52ad7d6f",
      "address": "bc1qq4c8nqyu7hqvl9z85kj0m7p8adfnggt9lwp4lx",
      "options": {
        "scope": "bip122:000000000019d6689c085ae165831e93",
        "index": 0
      },
      "methods": [
        "sendBitcoin"
      ],
      "scopes": [
        "bip122:000000000019d6689c085ae165831e93"
      ],
      "metadata": {
        "name": "Bitcoin Account",
        "importTime": 1737373980982,
        "keyring": {
          "type": "Snap Keyring"
        },
        "snap": {
          "id": "npm:@metamask/bitcoin-wallet-snap",
          "name": "Bitcoin",
          "enabled": true
        },
        "lastSelected": 1737373980995
      }
    },
    "9efc9170-7a0e-4039-a2d5-91ee21344027": {
      "type": "bip122:p2wpkh",
      "id": "9efc9170-7a0e-4039-a2d5-91ee21344027",
      "address": "tb1q2uh98jcgv7kj2n6683rl8mc0e42ks45xjnggej",
      "options": {
        "scope": "bip122:000000000933ea01ad0ee984209779ba",
        "index": 0
      },
      "methods": [
        "sendBitcoin"
      ],
      "scopes": [
        "bip122:000000000933ea01ad0ee984209779ba"
      ],
      "metadata": {
        "name": "Bitcoin Testnet Account",
        "importTime": 1737373988986,
        "keyring": {
          "type": "Snap Keyring"
        },
        "snap": {
          "id": "npm:@metamask/bitcoin-wallet-snap",
          "name": "Bitcoin",
          "enabled": true
        },
        "lastSelected": 1737373989000
      }
    },
    "8502ef9f-9e73-4a88-beef-6c686d25c1b7": {
      "type": "solana:data-account",
      "id": "8502ef9f-9e73-4a88-beef-6c686d25c1b7",
      "address": "7rNDaLreKMEDG9vBYPWvjDLX3LU4tEbMPEN6pTxdGVNL",
      "options": {
        "scope": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"
      },
      "methods": [
        "sendAndConfirmTransaction"
      ],
      "scopes": [
        "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
        "solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z",
        "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"
      ],
      "metadata": {
        "name": "Solana Account 1",
        "importTime": 1737373995496,
        "keyring": {
          "type": "Snap Keyring"
        },
        "snap": {
          "id": "npm:@metamask/solana-wallet-snap",
          "name": "Solana",
          "enabled": true
        },
        "lastSelected": 1737373995510
      }
    },
    "bd2e74e3-30d1-40c8-90d9-4e2f6cde4e46": {
      "id": "bd2e74e3-30d1-40c8-90d9-4e2f6cde4e46",
      "options": {},
      "address": "0xe9c53207e3dc5a59dba0b7e5fa946030e39eaff7",
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "type": "eip155:eoa",
      "scopes": [
        "eip155"
      ],
      "metadata": {
        "name": "SSK Account",
        "importTime": 1737374023616,
        "keyring": {
          "type": "Snap Keyring"
        },
        "snap": {
          "id": "npm:@metamask/snap-simple-keyring-snap",
          "name": "MetaMask Simple Snap Keyring",
          "enabled": true
        },
        "lastSelected": 1737374023633
      }
    },
    "81d94ebd-13ab-45d0-ae2e-a27798ab16b1": {
      "id": "81d94ebd-13ab-45d0-ae2e-a27798ab16b1",
      "options": {},
      "address": "0x8c8443089057dfea92546b2422641afd7632ca35",
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "type": "eip155:eoa",
      "scopes": [
        "eip155"
      ],
      "metadata": {
        "name": "SSK Account 2",
        "importTime": 1737374027656,
        "keyring": {
          "type": "Snap Keyring"
        },
        "snap": {
          "id": "npm:@metamask/snap-simple-keyring-snap",
          "name": "MetaMask Simple Snap Keyring",
          "enabled": true
        },
        "lastSelected": 1737374027674
      }
    },
    "05e5a618-ec82-45fb-a1c6-aa58c64d36f0": {
      "id": "05e5a618-ec82-45fb-a1c6-aa58c64d36f0",
      "options": {},
      "address": "0xb5e9ee46e6a61b688ed2be8de16975bc81f1d3da",
      "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
      ],
      "type": "eip155:eoa",
      "scopes": [
        "eip155"
      ],
      "metadata": {
        "name": "SSK Account 3",
        "importTime": 1737374034228,
        "keyring": {
          "type": "Snap Keyring"
        },
        "snap": {
          "id": "npm:@metamask/snap-simple-keyring-snap",
          "name": "MetaMask Simple Snap Keyring",
          "enabled": true
        },
        "lastSelected": 1737374034248
      }
    }
  },
  "selectedAccount": "8c028de9-0094-44af-be0a-335ded0c6117"
},
  1. Extension works as expected
Screen.Recording.2025-01-20.at.9.17.00.AM.mov

Copy link
Member

@gantunesr gantunesr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, left some minor comments

app/scripts/migrations/105.ts Outdated Show resolved Hide resolved
yarn.lock Outdated Show resolved Hide resolved
lavamoat/browserify/main/policy.json Show resolved Hide resolved
lavamoat/browserify/main/policy.json Show resolved Hide resolved
@metamaskbot
Copy link
Collaborator

Builds ready [0d3dfe4]
Page Load Metrics (1742 ± 104 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint42522081650342164
domContentLoaded143121921708217104
load143722121742217104
domInteractive25110382010
backgroundConnect789402512
firstReactRender1689332311
getState578202110
initialActions01000
loadScripts10211573122914168
setupStore68712178
uiStartup169224972016226109
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -38.65 KiB (-0.65%)
  • ui: 0 Bytes (0.00%)
  • common: -73.09 KiB (-0.84%)

@metamaskbot
Copy link
Collaborator

Builds ready [19b9874]
Page Load Metrics (1687 ± 75 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14462032169014972
domContentLoaded14382007165714871
load14462082168715575
domInteractive248638178
backgroundConnect683272612
firstReactRender1696402612
getState471232211
initialActions01000
loadScripts10421474121212459
setupStore69012189
uiStartup16162403194720799
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -38.65 KiB (-0.65%)
  • ui: 0 Bytes (0.00%)
  • common: -73.09 KiB (-0.83%)

Copy link
Contributor

@danroc danroc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

image

@ccharly ccharly enabled auto-merge January 21, 2025 16:52
Copy link
Contributor

@darkwing darkwing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UX pieces approved.

@ccharly ccharly added this pull request to the merge queue Jan 21, 2025
Merged via the queue into main with commit f856a3b Jan 21, 2025
72 checks passed
@ccharly ccharly deleted the feat/keyring-account-scopes branch January 21, 2025 17:51
@github-actions github-actions bot locked and limited conversation to collaborators Jan 21, 2025
@metamaskbot metamaskbot added the release-12.12.0 Issue or pull request that will be included in release 12.12.0 label Jan 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.12.0 Issue or pull request that will be included in release 12.12.0 team-accounts
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Update metamask/accounts-controller to version 21.0.0