File tree Expand file tree Collapse file tree 5 files changed +17
-3
lines changed
packages/thirdweb/src/wallets Expand file tree Collapse file tree 5 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " thirdweb " : patch
3+ ---
4+
5+ Added optional flag to ecosystem wallet creation for skipping fetching of default ecosystem info defined in the dashboard.
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ export type EcosystemWalletCreationOptions = {
2323 * The partnerId of the ecosystem wallet to connect to
2424 */
2525 partnerId ?: string ;
26+ /**
27+ * Optional flag to skip fetching and usage of ecosystem's info default account abstraction settings
28+ */
29+ skipEcosystemInfo ?: boolean ;
2630} ;
2731
2832export type EcosystemWalletConnectionOptions = InAppWalletConnectionOptions ;
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ export function createInAppWallet(args: {
7878 ecosystem ,
7979 ) ;
8080
81- if ( ecosystem ) {
81+ if ( ecosystem && ! createOptions ?. skipEcosystemInfo ) {
8282 const ecosystemOptions = await getEcosystemInfo ( ecosystem . id ) ;
8383 const smartAccountOptions = ecosystemOptions ?. smartAccountOptions ;
8484 if ( smartAccountOptions ) {
@@ -132,7 +132,7 @@ export function createInAppWallet(args: {
132132 ecosystem ,
133133 ) ;
134134
135- if ( ecosystem ) {
135+ if ( ecosystem && ! createOptions ?. skipEcosystemInfo ) {
136136 const ecosystemOptions = await getEcosystemInfo ( ecosystem . id ) ;
137137 const smartAccountOptions = ecosystemOptions ?. smartAccountOptions ;
138138 if ( smartAccountOptions ) {
@@ -206,7 +206,7 @@ export function createInAppWallet(args: {
206206 ecosystem ,
207207 ) ;
208208
209- if ( ecosystem ) {
209+ if ( ecosystem && ! createOptions ?. skipEcosystemInfo ) {
210210 const ecosystemOptions = await getEcosystemInfo ( ecosystem . id ) ;
211211 const smartAccountOptions = ecosystemOptions ?. smartAccountOptions ;
212212 if ( smartAccountOptions ) {
Original file line number Diff line number Diff line change @@ -87,5 +87,9 @@ export type InAppWalletCreationOptions =
8787 * Whether to hide the private key export button in the Connect Modal
8888 */
8989 hidePrivateKeyExport ?: boolean ;
90+ /**
91+ * Optional flag to skip fetching and usage of ecosystem's info default account abstraction settings
92+ */
93+ skipEcosystemInfo ?: boolean ;
9094 }
9195 | undefined ;
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ export function ecosystemWallet(
6767 options : [ ] , // controlled by ecosystem
6868 } ,
6969 partnerId : ecosystem . partnerId ,
70+ skipEcosystemInfo : createOptions ?. skipEcosystemInfo ,
7071 } ,
7172 connectorFactory : async ( client : ThirdwebClient ) => {
7273 const { InAppWebConnector } = await import ( "./lib/web-connector.js" ) ;
You can’t perform that action at this time.
0 commit comments