File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -282,6 +282,10 @@ export class Web3AuthNoModal extends SafeEventEmitter<Web3AuthNoModalEvents> imp
282282 // if AA is enabled, filter out chains that are not AA-supported
283283 if ( this . coreOptions . accountAbstractionConfig ) {
284284 // write a for loop over accountAbstractionConfig.chains and check if the chainId is valid
285+ if ( this . coreOptions . accountAbstractionConfig . chains . length === 0 ) {
286+ log . error ( "Please configure chains for smart accounts on dashboard at https://dashboard.web3auth.io" ) ;
287+ throw WalletInitializationError . invalidParams ( "Please configure chains for smart accounts on dashboard at https://dashboard.web3auth.io" ) ;
288+ }
285289 for ( const chain of this . coreOptions . accountAbstractionConfig . chains ) {
286290 if ( ! isHexStrict ( chain . chainId ) ) {
287291 log . error ( `Please provide a valid chainId in accountAbstractionConfig.chains for chain ${ chain . chainId } ` ) ;
You can’t perform that action at this time.
0 commit comments