fix: update

This commit is contained in:
Nik Dement'ev 2020-11-10 23:07:59 +03:00
parent fd15df068d
commit d7454e14c7
No known key found for this signature in database
GPG Key ID: 769B05D57CF16FE2
2 changed files with 14 additions and 10 deletions

View File

@ -2,7 +2,7 @@ const Web3 = require('web3')
const { hexToNumberString, toChecksumAddress, numberToHex } = require('web3-utils')
export default (ctx, inject) => {
const moduleOptions = <%= JSON.stringify(options) %>
// const moduleOptions = <%= JSON.stringify(options) %>
const instance = class Provider {
constructor(options) {
@ -264,6 +264,7 @@ export default (ctx, inject) => {
_repeatUntilResult(action, totalAttempts, retryAttempt = 1) {
return new Promise((resolve, reject) => {
const iteration = async () => {
try {
const result = await action()
if (!result) {
@ -276,6 +277,9 @@ export default (ctx, inject) => {
} else {
resolve(result)
}
} catch (err) {
reject(err)
}
}
iteration()

View File

@ -1,6 +1,6 @@
{
"name": "@nuxtjs/provider",
"version": "0.0.2",
"version": "0.0.3",
"description": "Provider integration with Nuxt.js",
"repository": "provider-module",
"license": "MIT",