File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @phantom/wallet-sdk " : patch
3
+ ---
4
+
5
+ Add SDK override URL parameter
Original file line number Diff line number Diff line change @@ -16,13 +16,14 @@ export type CreatePhantomConfig = Partial<{
16
16
paddingTop : number
17
17
paddingLeft : number
18
18
position : Position
19
+ sdkURL : string
19
20
} >
20
21
21
22
export function createPhantom ( config : CreatePhantomConfig = { } ) : void {
22
23
const container = document . head ?? document . documentElement
23
24
const scriptTag = document . createElement ( 'script' )
24
25
25
- const sdkURL = new URL ( SDK_URL )
26
+ const sdkURL = new URL ( config . sdkURL ?? SDK_URL )
26
27
if ( 'zIndex' in config && config . zIndex != null ) {
27
28
sdkURL . searchParams . append ( 'zIndex' , config . zIndex . toString ( ) )
28
29
}
@@ -60,3 +61,4 @@ export function createPhantom (config: CreatePhantomConfig = {}): void {
60
61
container . insertBefore ( scriptTag , container . children [ 0 ] )
61
62
container . removeChild ( scriptTag )
62
63
}
64
+
You can’t perform that action at this time.
0 commit comments