Skip to content

Commit

Permalink
fix modal config null pointer error
Browse files Browse the repository at this point in the history
  • Loading branch information
BboyStatix committed Sep 19, 2024
1 parent b6862b3 commit 286b3ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/modal/src/modalManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit 286b3ca

Please sign in to comment.