Skip to content

Commit df8e749

Browse files
authored
Merge pull request #23 from Crossmint/cc/force-wallet-selection
Add support for `forceWalletSelection`
2 parents a470887 + 08e9f52 commit df8e749

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/CrossmintEmbed.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ export default class CrossmintEmbed {
1414
private _config: CrossmintEmbedConfig;
1515

1616
private get _frameUrl() {
17-
const { environment, chain, projectId } = this._config;
17+
const { environment, chain, projectId, forceWalletSelection } = this._config;
1818
const projectIdQueryParam = projectId != null ? `&projectId=${projectId}` : "";
19+
const forceWalletSelectionQueryParam = forceWalletSelection != null ? `&forceWalletSelection=${forceWalletSelection}` : "";
1920

20-
return `${environment}/2023-06-09/frame?chain=${chain}${projectIdQueryParam}`;
21+
return `${environment}/2023-06-09/frame?chain=${chain}${projectIdQueryParam}${forceWalletSelectionQueryParam}`;
2122
}
2223

2324
private constructor(config: CrossmintEmbedConfig) {

src/types/config.ts

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export interface CrossmintEmbedParams {
99
* or set it to "all" to get all wallets from all projects.
1010
*/
1111
projectId?: string;
12+
forceWalletSelection?: boolean;
1213

1314
chain: BlockchainTypes;
1415

@@ -33,6 +34,7 @@ export interface CrossmintEmbedConfig {
3334
libVersion: string;
3435

3536
projectId?: string;
37+
forceWalletSelection?: boolean;
3638

3739
chain: BlockchainTypes;
3840

src/utils/config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export function buildConfig(params: CrossmintEmbedParams): CrossmintEmbedConfig
1010
maxTimeAutoConnectMs: params.maxTimeAutoConnectMs || 300,
1111
appMetadata: params.appMetadata,
1212
chain: params.chain,
13+
forceWalletSelection: params.forceWalletSelection,
1314
};
1415

1516
return ret;

0 commit comments

Comments
 (0)