Skip to content

Commit 94ef7e1

Browse files
committed
Railgun fx
1 parent 48a6bb8 commit 94ef7e1

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/services/railgun/operations.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)