Skip to content

Commit

Permalink
docs: add prd
Browse files Browse the repository at this point in the history
  • Loading branch information
see2ever committed Jun 4, 2021
1 parent 6bef81c commit a188033
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Binary file added docs/Rabby 0.1 Feature List.pdf
Binary file not shown.
Binary file modified docs/Rabby 0.1 产品功能文档.pdf
Binary file not shown.
16 changes: 12 additions & 4 deletions src/content-script/pageProvider/pushEventHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,23 @@ class PushEventHandlers {
};

accountsChanged = (accounts) => {
if (accounts?.[0] === this.provider.selectedAddress) {
return;
}
this.provider.selectedAddress = accounts?.[0];
this.provider.emit('accountsChanged', accounts);
};

chainChanged = ({ chain, networkVersion }) => {
this.provider.chainId = chain;
this.provider.networkVersion = networkVersion;
this.provider.emit('chainChanged', chain);
this.provider.emit('networkChanged', networkVersion);
if (chain !== this.provider.chainId) {
this.provider.chainId = chain;
this.provider.emit('chainChanged', chain);
}

if (networkVersion !== this.provider.networkVersion) {
this.provider.networkVersion = networkVersion;
this.provider.emit('networkChanged', networkVersion);
}
};
}

Expand Down

0 comments on commit a188033

Please sign in to comment.