File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -93,13 +93,6 @@ export default class SemaphoreViem {
9393 constructor ( networkOrEthereumURL : ViemNetwork | string = defaultNetwork , options : ViemOptions = { } ) {
9494 requireString ( networkOrEthereumURL , "networkOrEthereumURL" )
9595
96- if ( options . transport ) {
97- // Transport is provided directly
98- } else if ( ! networkOrEthereumURL . startsWith ( "http" ) ) {
99- // Default to http transport if no transport is provided and network is not a URL
100- options . transport = http ( )
101- }
102-
10396 if ( options . apiKey ) {
10497 requireString ( options . apiKey , "apiKey" )
10598 }
@@ -118,11 +111,11 @@ export default class SemaphoreViem {
118111 }
119112
120113 let transport : Transport
121-
122114 if ( options . transport ) {
123115 transport = options . transport
116+ } else if ( ! networkOrEthereumURL . startsWith ( "http" ) ) {
117+ transport = http ( )
124118 } else {
125- // If no transport is provided, use http transport with the URL
126119 transport = http ( networkOrEthereumURL )
127120 }
128121
You can’t perform that action at this time.
0 commit comments