File tree 2 files changed +3
-1
lines changed
packages/@magic-sdk/provider
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ export interface MagicSDKAdditionalConfiguration<
95
95
network ?: EthNetworkConfiguration ;
96
96
extensions ?: TExt ;
97
97
testMode ?: boolean ;
98
+ deferPreload ?: boolean ;
98
99
}
99
100
100
101
export class SDKBase {
@@ -168,6 +169,7 @@ export class SDKBase {
168
169
locale : options ?. locale || 'en_US' ,
169
170
...( SDKEnvironment . bundleId ? { bundleId : SDKEnvironment . bundleId } : { } ) ,
170
171
} ) ;
172
+ if ( ! options ?. deferPreload ) this . preload ( ) ;
171
173
}
172
174
173
175
/**
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ beforeEach(() => {
10
10
11
11
test ( '`MagicSDK.overlay` is lazy loaded' , async ( ) => {
12
12
const Ctor = createMagicSDKCtor ( ) ;
13
- const magic = new Ctor ( TEST_API_KEY ) ;
13
+ const magic = new Ctor ( TEST_API_KEY , { deferPreload : true } ) ;
14
14
15
15
expect ( ( SDKBase as any ) . __overlays__ . size ) . toBe ( 0 ) ;
16
16
You can’t perform that action at this time.
0 commit comments