Skip to content

Commit

Permalink
Custom Network (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
vignesha22 authored Nov 22, 2023
1 parent df26ec5 commit c2813c9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## [1.3.13] - 2023-11-22
### Bug Fixes
- Removed UnsupportedChainId error and now can add custom network details

## [1.3.12] - 2023-11-17
### New
- Added Klaytn mainnet and Testnet (Baobab)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@etherspot/prime-sdk",
"version": "1.3.12",
"version": "1.3.13",
"description": "Etherspot Prime (Account Abstraction) SDK",
"keywords": [
"ether",
Expand Down
6 changes: 1 addition & 5 deletions src/sdk/network/network.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class NetworkService extends Service {
: this.supportedNetworks[0];

if (!this.defaultNetwork) {
throw new Exception('Unsupported network');
this.defaultNetwork = this.supportedNetworks.find(({ chainId }) => chainId === 1)
}

this.chainId$ = this.network$.observeKey('chainId');
Expand All @@ -56,10 +56,6 @@ export class NetworkService extends Service {
this.network$.next(this.supportedNetworks.find(({ name }) => name === networkName) || null);
}

// isNetworkNameSupported(networkName: string): boolean {
// return !!this.supportedNetworks.find(({ name }) => name === networkName);
// }

isNetworkSupported(chainId: number): boolean {
return SupportedNetworks.includes(chainId);
}
Expand Down

0 comments on commit c2813c9

Please sign in to comment.