Skip to content

Commit 25b7451

Browse files
Merge pull request #2052 from Web3Auth/feat/gate-wallet
Feat/gate wallet
2 parents f351d6b + 9e74f23 commit 25b7451

File tree

1 file changed

+0
-9
lines changed
  • packages/plugins/wallet-services-plugin/src

1 file changed

+0
-9
lines changed

packages/plugins/wallet-services-plugin/src/plugin.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)