Skip to content

Conversation

@keithbro-imx
Copy link
Contributor

@keithbro-imx keithbro-imx commented Sep 24, 2025

Hi👋, please ensure the PR title follows the below standards:

  • PR is titled with conventional commit style naming: type(scope): message. For example: feat(passport): my new feature
  • If you have introduced modification that necessitates immediate adjustments by this SDK's users to their applications, clients, or integrations to avert disruptions to existing features or functionalities, add a ! after the type(scope), for example feat(passport)!: my new breaking feature

Summary

Allows the Commerce widgets to be restricted to Passport-only.

Detail and impact of the change

Example usage:

const widget = factory.create(checkout.WidgetType.IMMUTABLE_COMMERCE, {
  CONNECT: { allowlistWalletRdns: [WalletProviderRdns.PASSPORT] }, 
});

widget.mount("widget-root", { flow: CommerceFlowType.SALE });

Added

Changed

Deprecated

Removed

Fixed

Security

Anything else worth calling out?

@keithbro-imx keithbro-imx changed the base branch from main to task/GFI-45-customisable-transfer-header September 24, 2025 06:34
Base automatically changed from task/GFI-45-customisable-transfer-header to main September 24, 2025 06:44
@nx-cloud
Copy link

nx-cloud bot commented Sep 25, 2025

View your CI Pipeline Execution ↗ for commit cba1ac8

Command Status Duration Result
nx affected -t build,lint,test ✅ Succeeded 2m 2s View ↗
nx run-many -p @imtbl/sdk,@imtbl/checkout-widge... ✅ Succeeded 1m 2s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-25 04:54:20 UTC

@keithbro-imx keithbro-imx changed the title feat(checkout-widgets): Allow blocklistWalletRdns to be used with non-Connect widgets feat(checkout-widgets): Add allowlistWalletRdns option to Checkout Widgets Sep 25, 2025
targetChainId: ChainId;
walletProviderName?: WalletProviderName;
browserProvider?: WrappedBrowserProvider;
walletProviderName: WalletProviderName | undefined;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMO preferable in this case because it makes it explicit that we are not passing a value through (for example in packages/checkout/widgets-lib/src/widgets/immutable-commerce/functions/getConnectLoaderParams.ts)

allowedChains={allowedChains ?? [targetChain]}
blocklistWalletRdns={blocklistWalletRdns}
allowlistWalletRdns={allowlistWalletRdns}
blocklistWalletRdns={blocklistWalletRdns ?? []}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Default to [] here so that we reduce complexity by not having to deal with undefined lower in the stack

browserProvider: this.browserProvider,
checkout: this.checkout,
allowedChains: [this.checkout.config.l1ChainId, this.checkout.config.l2ChainId],
allowlistWalletRdns: undefined,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This feature is not supported on legacy widgets (except for on the ConnectWidget)

checkout: this.checkout,
allowedChains: [this.checkout.config.l2ChainId],
allowlistWalletRdns: undefined,
walletProviderName: undefined,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting that we're not passing along this.parameters.walletProviderName, like in the other widget roots, not sure what the implication of that is...

@keithbro-imx keithbro-imx marked this pull request as ready for review September 25, 2025 06:46
@keithbro-imx keithbro-imx requested a review from a team as a code owner September 25, 2025 06:46
@keithbro-imx keithbro-imx added this pull request to the merge queue Sep 29, 2025
Merged via the queue into main with commit 6c0b4d2 Sep 29, 2025
10 checks passed
@keithbro-imx keithbro-imx deleted the NOJIRA-blocklistWalletRdns-connect-loader branch September 29, 2025 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants