Compare commits

...

2 Commits

Author SHA1 Message Date
nikdementev c3cac21dd1
chore: bump web3 version 2021-08-30 17:55:41 +03:00
Pasha8914 8d7c3f9e34 feat: injected request function
change version to 0.1.3
2021-06-02 16:53:53 +03:00
3 changed files with 647 additions and 265 deletions

View File

@ -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) {

View File

@ -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": {

900
yarn.lock

File diff suppressed because it is too large Load Diff