diff --git a/packages/examples/packages/browserify-plugin/snap.manifest.json b/packages/examples/packages/browserify-plugin/snap.manifest.json
index 304213343d..ff42946368 100644
--- a/packages/examples/packages/browserify-plugin/snap.manifest.json
+++ b/packages/examples/packages/browserify-plugin/snap.manifest.json
@@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
- "shasum": "zGgTjLWTEn796eXGvv66p8tGxZSa82yEEGnRtyVutEc=",
+ "shasum": "hU2i377FhKzvwrx4y28hc5XFO3KccCUq7bAJdsQ2CD0=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
diff --git a/packages/examples/packages/browserify/snap.manifest.json b/packages/examples/packages/browserify/snap.manifest.json
index 80491ec47b..e69b567157 100644
--- a/packages/examples/packages/browserify/snap.manifest.json
+++ b/packages/examples/packages/browserify/snap.manifest.json
@@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
- "shasum": "qfkidJLew8JNN2Enx4pDUgWNgLPqBkG0k3mGQRR1oaY=",
+ "shasum": "VCd6NkT2lPRvH5tKtzCqtW4dO8zEA3/zagYxhhv1mBI=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
diff --git a/packages/snaps-sdk/src/jsx/components/form/AccountSelector.test.tsx b/packages/snaps-sdk/src/jsx/components/form/AccountSelector.test.tsx
index 7904e60cbf..02d65c70a0 100644
--- a/packages/snaps-sdk/src/jsx/components/form/AccountSelector.test.tsx
+++ b/packages/snaps-sdk/src/jsx/components/form/AccountSelector.test.tsx
@@ -6,7 +6,7 @@ describe('AccountSelector', () => {
);
@@ -16,7 +16,7 @@ describe('AccountSelector', () => {
props: {
name: 'account',
title: 'From account',
- chainId: 'bip122:p2wpkh',
+ chainIds: ['bip122:p2wpkh'],
selectedAddress: 'bc1qc8dwyqua9elc3mzcxk93c70kjz8tcc92x0a8a6',
},
key: null,
diff --git a/packages/snaps-sdk/src/jsx/components/form/AccountSelector.ts b/packages/snaps-sdk/src/jsx/components/form/AccountSelector.ts
index 78f54cf63b..68d2aaf938 100644
--- a/packages/snaps-sdk/src/jsx/components/form/AccountSelector.ts
+++ b/packages/snaps-sdk/src/jsx/components/form/AccountSelector.ts
@@ -8,14 +8,14 @@ import { createSnapComponent } from '../../component';
* @property name - The name of the account selector. This is used to identify the
* state in the form data.
* @property title - The title of the account selector. This is displayed in the UI.
- * @property chainId - The chain ID of the account selector. This should be a valid CAIP-2 chain ID.
+ * @property chainIds - The chain IDs of the account selector. This should be a valid CAIP-2 chain ID array.
* @property selectedAddress - The default selected address of the account selector. This should be a
* valid CAIP-10 account address.
*/
export type AccountSelectorProps = {
name: string;
title: string;
- chainId: CaipChainId;
+ chainIds: CaipChainId[];
selectedAddress: CaipAccountAddress;
};
@@ -30,14 +30,14 @@ const TYPE = 'AccountSelector';
* @param props.name - The name of the account selector field. This is used to identify the
* state in the form data.
* @param props.title - The title of the account selector field. This is displayed in the UI.
- * @param props.chainId - The chain ID of the account selector. This should be a valid CAIP-2 chain ID.
+ * @param props.chainIds - The chain IDs of the account selector. This should be a valid CAIP-2 chain ID array.
* @param props.selectedAddress - The selected address of the account selector. This should be a
* valid CAIP-10 account address.
* @returns An account selector element.
* @example
- *
+ *
* @example
- *
+ *
*/
export const AccountSelector = createSnapComponent<
AccountSelectorProps,
diff --git a/packages/snaps-sdk/src/jsx/validation.test.tsx b/packages/snaps-sdk/src/jsx/validation.test.tsx
index ff42634d56..d9b47508a0 100644
--- a/packages/snaps-sdk/src/jsx/validation.test.tsx
+++ b/packages/snaps-sdk/src/jsx/validation.test.tsx
@@ -963,13 +963,13 @@ describe('AccountSelectorStruct', () => {
,
,
])('validates an account picker element', (value) => {
@@ -994,19 +994,19 @@ describe('AccountSelectorStruct', () => {
// @ts-expect-error - Invalid props.
,
// @ts-expect-error - Invalid props.
- ,
+ ,
// @ts-expect-error - Invalid props.
,
,
,
foo,
diff --git a/packages/snaps-sdk/src/jsx/validation.ts b/packages/snaps-sdk/src/jsx/validation.ts
index b07da65ffb..d4f5d4dfa8 100644
--- a/packages/snaps-sdk/src/jsx/validation.ts
+++ b/packages/snaps-sdk/src/jsx/validation.ts
@@ -342,10 +342,12 @@ export const AccountSelectorStruct: Describe = element(
{
name: string(),
title: string(),
- chainId: CaipChainIdStruct as unknown as Struct<
- Infer,
- Infer
- >,
+ chainIds: array(
+ CaipChainIdStruct as unknown as Struct<
+ Infer,
+ Infer
+ >,
+ ),
selectedAddress: CaipAccountAddressStruct,
},
);