@ -30,7 +30,7 @@ export class InjectedProvider extends Plugin {
return reject ( new Error ( 'no injected provider found.' ) )
}
try {
if ( ( window as any ) && typeof ( window as any ) . ethereum . enable === 'function' ) ( window as any ) . ethereum . enable ( )
if ( ( window as any ) && typeof ( window as any ) . ethereum . request === "function" ) ( window as any ) . ethereum . request ( { method : "eth_requestAccounts" } ) ;
if ( ! await ( window as any ) . ethereum . _metamask . isUnlocked ( ) ) this . call ( 'notification' , 'toast' , 'Please make sure the injected provider is unlocked (e.g Metamask).' )
await addL2Network ( this . chainName , this . chainId , this . rpcUrls )
const resultData = await this . provider . currentProvider . send ( data . method , data . params )