Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
nikdementev | c3cac21dd1 | |
Pasha8914 | 8d7c3f9e34 |
|
@ -197,9 +197,13 @@ export default (ctx, inject) => {
|
|||
|
||||
async _initProvider() {
|
||||
try {
|
||||
const request = () =>
|
||||
let request = () =>
|
||||
this.version === 'old' ? this.provider.enable() : this.sendRequest({ method: 'eth_requestAccounts' })
|
||||
|
||||
if (this.provider.injectedRequest && typeof this.provider.injectedRequest === 'function') {
|
||||
request = () => this.provider.injectedRequest()
|
||||
}
|
||||
|
||||
const [account] = await request()
|
||||
|
||||
if (!account) {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"name": "nuxt-web3-provider",
|
||||
"version": "0.1.2",
|
||||
"version": "0.1.4",
|
||||
"description": "Provider integration with Nuxt.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tornadocash/provider"
|
||||
},
|
||||
"license": "MIT",
|
||||
"contributors": "pertsev",
|
||||
"contributors": ["pertsev"],
|
||||
"main": "lib/module.js",
|
||||
"types": "types/index.d.ts",
|
||||
"files": [
|
||||
|
@ -19,7 +19,7 @@
|
|||
"release": "git push --follow-tags && npm publish"
|
||||
},
|
||||
"dependencies": {
|
||||
"web3": "^1.3.0",
|
||||
"web3": "^1.5.2",
|
||||
"web3-utils": "^1.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
Loading…
Reference in New Issue