@wallet01/cosmos
Advanced tools
Comparing version 0.2.0 to 0.3.0
# @wallet01/cosmos | ||
## 0.3.0 | ||
### Minor Changes | ||
- Fix dependencies and react error handling | ||
### Patch Changes | ||
- Updated dependencies | ||
- @wallet01/core@0.3.0 | ||
## 0.2.0 | ||
@@ -4,0 +15,0 @@ |
{ | ||
"name": "@wallet01/cosmos", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"main": "dist/index.mjs", | ||
@@ -10,3 +10,3 @@ "module": "dist/index.mjs", | ||
"eventemitter3": "^4.0.7", | ||
"@wallet01/core": "0.2.0", | ||
"@wallet01/core": "0.3.0", | ||
"@keplr-wallet/types": "^0.11.13" | ||
@@ -13,0 +13,0 @@ }, |
@@ -17,3 +17,2 @@ import { Window as KeplrWindow } from '@keplr-wallet/types'; | ||
this.name = 'Keplr'; | ||
this.getProvider(); | ||
} | ||
@@ -24,4 +23,6 @@ | ||
this.provider = window.keplr; | ||
return this.provider; | ||
} else { | ||
throw new Error('Wallet Not Installed!'); | ||
} | ||
return this.provider; | ||
} | ||
@@ -54,3 +55,3 @@ | ||
console.error(err); | ||
throw new Error('Error in switching chain'); | ||
throw err; | ||
} | ||
@@ -64,19 +65,7 @@ } | ||
try { | ||
await this.provider.enable(chainId); | ||
setLastUsedConnector(this.name); | ||
} catch (err) { | ||
console.error('Error in enable', err); | ||
} | ||
// const data: ConnectedData<KeplrProvider> = { | ||
// account: (await this.getAccount())[0], | ||
// chainId: this.chain, | ||
// provider: this.provider, | ||
// }; | ||
emitter.emit('connected'); | ||
await this.provider.enable(chainId); | ||
setLastUsedConnector(this.name); | ||
} catch (error) { | ||
console.error(error); | ||
throw new Error('Error in Connecting'); | ||
throw error; | ||
} | ||
@@ -86,2 +75,3 @@ } | ||
async disconnect(): Promise<void> { | ||
this.chain = ''; | ||
emitter.emit('disconnected'); | ||
@@ -109,3 +99,3 @@ } | ||
console.warn(error); | ||
throw new Error(error); | ||
throw error; | ||
} | ||
@@ -112,0 +102,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
14
1
13
10104
270
+ Added@wallet01/core@0.3.0(transitive)
- Removed@wallet01/core@0.2.0(transitive)
Updated@wallet01/core@0.3.0