@@ -169,7 +169,6 @@ export class WalletServicesPlugin extends SafeEventEmitter implements IPlugin {
169169 sessionId,
170170 sessionNamespace,
171171 } ) ;
172- if ( this . walletInitOptions ?. whiteLabel ?. showWidgetButton ) this . wsEmbedInstance . showTorusButton ( ) ;
173172 this . subscribeToProviderEvents ( this . provider ) ;
174173 this . subscribeToWalletEvents ( ) ;
175174 this . emit ( PLUGIN_EVENTS . CONNECTED ) ;
@@ -219,7 +218,6 @@ export class WalletServicesPlugin extends SafeEventEmitter implements IPlugin {
219218 private subscribeToWalletEvents ( ) {
220219 this . wsEmbedInstance ?. provider . on ( "accountsChanged" , ( accounts : unknown [ ] = [ ] ) => {
221220 if ( ( accounts as string [ ] ) . length === 0 ) {
222- this . wsEmbedInstance . hideTorusButton ( ) ;
223221 if ( this . web3auth ?. status === ADAPTER_STATUS . CONNECTED ) this . web3auth ?. logout ( ) ;
224222 }
225223 } ) ;
@@ -233,12 +231,6 @@ export class WalletServicesPlugin extends SafeEventEmitter implements IPlugin {
233231 provider . on ( "chainChanged" , ( chainId : string ) => {
234232 this . setChainID ( parseInt ( chainId , 16 ) ) ;
235233 } ) ;
236- provider . on ( "disconnect" , ( ) => {
237- this . wsEmbedInstance . hideTorusButton ( ) ;
238- } ) ;
239- provider . on ( "connect" , ( ) => {
240- if ( this . walletInitOptions ?. whiteLabel ?. showWidgetButton ) this . wsEmbedInstance . showTorusButton ( ) ;
241- } ) ;
242234 }
243235
244236 private subscribeToWeb3AuthEvents ( web3Auth : IWeb3AuthCore ) {
@@ -253,7 +245,6 @@ export class WalletServicesPlugin extends SafeEventEmitter implements IPlugin {
253245 if ( this . wsEmbedInstance . isLoggedIn ) {
254246 await this . wsEmbedInstance . logout ( ) ;
255247 }
256- this . wsEmbedInstance . hideTorusButton ( ) ;
257248 } ) ;
258249 }
259250
0 commit comments