diff --git a/CHANGELOG.md b/CHANGELOG.md index bbe4e9f9..791e950b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/package-lock.json b/package-lock.json index 27c0165e..d9c02e79 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@etherspot/prime-sdk", - "version": "1.3.12", + "version": "1.3.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@etherspot/prime-sdk", - "version": "1.3.12", + "version": "1.3.13", "license": "MIT", "dependencies": { "@apollo/client": "3.8.6", diff --git a/package.json b/package.json index 0767d67a..5be55e01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@etherspot/prime-sdk", - "version": "1.3.12", + "version": "1.3.13", "description": "Etherspot Prime (Account Abstraction) SDK", "keywords": [ "ether", diff --git a/src/sdk/network/network.service.ts b/src/sdk/network/network.service.ts index c5819372..757f99eb 100644 --- a/src/sdk/network/network.service.ts +++ b/src/sdk/network/network.service.ts @@ -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'); @@ -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); }