Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/neat-poems-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Added optional flag to ecosystem wallet creation for skipping fetching of default ecosystem info defined in the dashboard.
4 changes: 4 additions & 0 deletions packages/thirdweb/src/wallets/ecosystem/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export type EcosystemWalletCreationOptions = {
* The partnerId of the ecosystem wallet to connect to
*/
partnerId?: string;
/**
* Optional flag to skip fetching and usage of ecosystem's info default account abstraction settings
*/
skipEcosystemInfo?: boolean;
};

export type EcosystemWalletConnectionOptions = InAppWalletConnectionOptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function createInAppWallet(args: {
ecosystem,
);

if (ecosystem) {
if (ecosystem && !createOptions?.skipEcosystemInfo) {
const ecosystemOptions = await getEcosystemInfo(ecosystem.id);
const smartAccountOptions = ecosystemOptions?.smartAccountOptions;
if (smartAccountOptions) {
Expand Down Expand Up @@ -132,7 +132,7 @@ export function createInAppWallet(args: {
ecosystem,
);

if (ecosystem) {
if (ecosystem && !createOptions?.skipEcosystemInfo) {
const ecosystemOptions = await getEcosystemInfo(ecosystem.id);
const smartAccountOptions = ecosystemOptions?.smartAccountOptions;
if (smartAccountOptions) {
Expand Down Expand Up @@ -206,7 +206,7 @@ export function createInAppWallet(args: {
ecosystem,
);

if (ecosystem) {
if (ecosystem && !createOptions?.skipEcosystemInfo) {
const ecosystemOptions = await getEcosystemInfo(ecosystem.id);
const smartAccountOptions = ecosystemOptions?.smartAccountOptions;
if (smartAccountOptions) {
Expand Down
4 changes: 4 additions & 0 deletions packages/thirdweb/src/wallets/in-app/core/wallet/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,9 @@ export type InAppWalletCreationOptions =
* Whether to hide the private key export button in the Connect Modal
*/
hidePrivateKeyExport?: boolean;
/**
* Optional flag to skip fetching and usage of ecosystem's info default account abstraction settings
*/
skipEcosystemInfo?: boolean;
}
| undefined;
1 change: 1 addition & 0 deletions packages/thirdweb/src/wallets/in-app/web/ecosystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export function ecosystemWallet(
options: [], // controlled by ecosystem
},
partnerId: ecosystem.partnerId,
skipEcosystemInfo: createOptions?.skipEcosystemInfo,
},
connectorFactory: async (client: ThirdwebClient) => {
const { InAppWebConnector } = await import("./lib/web-connector.js");
Expand Down
Loading