@@ -166,7 +166,6 @@ export class WalletServicesPlugin extends SafeEventEmitter implements IPlugin {
166166 sessionId,
167167 sessionNamespace,
168168 } ) ;
169- if ( this . walletInitOptions ?. whiteLabel ?. showWidgetButton ) this . wsEmbedInstance . showTorusButton ( ) ;
170169 this . subscribeToProviderEvents ( this . provider ) ;
171170 this . subscribeToWalletEvents ( ) ;
172171 this . emit ( PLUGIN_EVENTS . CONNECTED ) ;
@@ -216,7 +215,6 @@ export class WalletServicesPlugin extends SafeEventEmitter implements IPlugin {
216215 private subscribeToWalletEvents ( ) {
217216 this . wsEmbedInstance ?. provider . on ( "accountsChanged" , ( accounts : unknown [ ] = [ ] ) => {
218217 if ( ( accounts as string [ ] ) . length === 0 ) {
219- this . wsEmbedInstance . hideTorusButton ( ) ;
220218 if ( this . web3auth ?. status === ADAPTER_STATUS . CONNECTED ) this . web3auth ?. logout ( ) ;
221219 }
222220 } ) ;
@@ -230,12 +228,6 @@ export class WalletServicesPlugin extends SafeEventEmitter implements IPlugin {
230228 provider . on ( "chainChanged" , ( chainId : string ) => {
231229 this . setChainID ( parseInt ( chainId , 16 ) ) ;
232230 } ) ;
233- provider . on ( "disconnect" , ( ) => {
234- this . wsEmbedInstance . hideTorusButton ( ) ;
235- } ) ;
236- provider . on ( "connect" , ( ) => {
237- if ( this . walletInitOptions ?. whiteLabel ?. showWidgetButton ) this . wsEmbedInstance . showTorusButton ( ) ;
238- } ) ;
239231 }
240232
241233 private subscribeToWeb3AuthEvents ( web3Auth : IWeb3AuthCore ) {
@@ -250,7 +242,6 @@ export class WalletServicesPlugin extends SafeEventEmitter implements IPlugin {
250242 if ( this . wsEmbedInstance . isLoggedIn ) {
251243 await this . wsEmbedInstance . logout ( ) ;
252244 }
253- this . wsEmbedInstance . hideTorusButton ( ) ;
254245 } ) ;
255246 }
256247
0 commit comments