From 3c24e852858ad7d11915f61c63202343e25d0ab1 Mon Sep 17 00:00:00 2001 From: Archit Date: Tue, 17 Dec 2024 15:43:05 +0530 Subject: [PATCH] fixes no modal constructor params --- packages/no-modal/src/noModal.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/no-modal/src/noModal.ts b/packages/no-modal/src/noModal.ts index 38ad7ccc4..ded3dd197 100644 --- a/packages/no-modal/src/noModal.ts +++ b/packages/no-modal/src/noModal.ts @@ -59,7 +59,7 @@ export class Web3AuthNoModal extends SafeEventEmitter imp if (!options.clientId) throw WalletInitializationError.invalidParams("Please provide a valid clientId in constructor"); if (options.enableLogging) log.enableAll(); else log.setLevel("error"); - if (!options.privateKeyProvider && !options.chainConfig) { + if (!options.privateKeyProvider || !options.chainConfig) { throw WalletInitializationError.invalidParams("Please provide chainConfig or privateKeyProvider"); } options.chainConfig = options.chainConfig || options.privateKeyProvider.currentChainConfig;