diff --git a/packages/base/src/hooks/index.ts b/packages/base/src/hooks/index.ts index dcd407313..09ab3f90d 100644 --- a/packages/base/src/hooks/index.ts +++ b/packages/base/src/hooks/index.ts @@ -6,11 +6,15 @@ import { CustomChainConfig } from "../chain/IChainInterface"; import { IPlugin } from "../plugin"; export interface IBaseWeb3AuthHookContext { + isInitialized: boolean; + isInitializing: boolean; + initError: unknown; isConnected: boolean; + isConnecting: boolean; + connectError: unknown; provider: IProvider | null; userInfo: Partial | null; isMFAEnabled: boolean; - isInitialized: boolean; status: ADAPTER_STATUS_TYPE | null; enableMFA(params?: LoginParams): Promise; logout(params?: { cleanup: boolean }): Promise; diff --git a/packages/modal/src/modalManager.ts b/packages/modal/src/modalManager.ts index a24e139f4..df263fa50 100644 --- a/packages/modal/src/modalManager.ts +++ b/packages/modal/src/modalManager.ts @@ -116,7 +116,7 @@ export class Web3Auth extends Web3AuthNoModal implements IWeb3AuthModal { }, }; if (!params?.modalConfig) params = { modalConfig: {} }; - const localSmsOtpEnabled = params.modalConfig[WALLET_ADAPTERS.AUTH]?.loginMethods?.[LOGIN_PROVIDER.SMS_PASSWORDLESS].showOnModal; + const localSmsOtpEnabled = params.modalConfig[WALLET_ADAPTERS.AUTH]?.loginMethods?.[LOGIN_PROVIDER.SMS_PASSWORDLESS]?.showOnModal; if (localSmsOtpEnabled === true && smsOtpEnabled === false) { throw WalletInitializationError.invalidParams("must enable sms otp on dashboard in order to utilise it"); }