mirror of
https://github.com/tornadocash/provider.git
synced 2024-11-21 17:26:51 +01:00
feat: injected request function
change version to 0.1.3
This commit is contained in:
parent
170d58e067
commit
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,6 +1,6 @@
|
||||
{
|
||||
"name": "nuxt-web3-provider",
|
||||
"version": "0.1.2",
|
||||
"version": "0.1.3",
|
||||
"description": "Provider integration with Nuxt.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
Loading…
Reference in New Issue
Block a user