File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -174,12 +174,17 @@ export async function executeShield(
174174
175175 // Ensure provider is loaded for the target network
176176 const chainId = getChainId ( params . networkName ) ;
177- if ( chainId ) {
178- const providerLoaded = await loadNetworkProvider ( chainId as RailgunChainId ) ;
179- if ( ! providerLoaded ) {
180- console . warn ( `[RAILGUN] Could not load provider for ${ params . networkName } , continuing anyway` ) ;
181- }
177+ console . log ( `[RAILGUN] Shield requested for network: ${ params . networkName } , chainId: ${ chainId } ` ) ;
178+
179+ if ( ! chainId ) {
180+ return { success : false , error : `Unsupported network: ${ params . networkName } ` } ;
181+ }
182+
183+ const providerLoaded = await loadNetworkProvider ( chainId as RailgunChainId ) ;
184+ if ( ! providerLoaded ) {
185+ return { success : false , error : `Could not load RAILGUN provider for ${ params . networkName } . Please try again.` } ;
182186 }
187+ console . log ( `[RAILGUN] Provider loaded successfully for ${ params . networkName } ` ) ;
183188
184189 const walletId = getWalletId ( ) ;
185190 const railgunAddress = getRailgunAddress ( ) ;
You can’t perform that action at this time.
0 commit comments