@formo/analytics 2.0.0-alpha.1 → 2.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formo/analytics",
3
- "version": "2.0.0-alpha.1",
3
+ "version": "2.0.0-alpha.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/getformo/sdk.git"
@@ -366,7 +366,10 @@ export class FormoAnalytics implements IFormoAnalytics {
366
366
 
367
367
  private async onAccountsChanged(accounts: string[]) {
368
368
  if (accounts.length > 0) {
369
- this.handleAccountConnected(accounts[0]);
369
+ const newAccount = accounts[0];
370
+ if (newAccount !== this.currentConnectedAccount) {
371
+ this.handleAccountConnected(newAccount);
372
+ }
370
373
  } else {
371
374
  this.handleAccountDisconnected();
372
375
  }
@@ -455,7 +458,7 @@ export class FormoAnalytics implements IFormoAnalytics {
455
458
 
456
459
  this.currentChainId = await this.getCurrentChainId();
457
460
 
458
- return this.connect({ chainId: this.currentChainId, address: account });
461
+ this.connect({ chainId: this.currentChainId, address: account });
459
462
  }
460
463
 
461
464
  private async getCurrentWallet() {