Updated dist files.
This commit is contained in:
parent
f318fd9cf1
commit
05648177aa
2
_version.d.ts
vendored
2
_version.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const version = "4.0.25";
|
||||
export declare const version = "4.0.26";
|
||||
|
@ -1,3 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "4.0.25";
|
||||
exports.version = "4.0.26";
|
||||
|
19
dist/ethers.js
vendored
19
dist/ethers.js
vendored
@ -1,7 +1,7 @@
|
||||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ethers = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "4.0.25";
|
||||
exports.version = "4.0.26";
|
||||
|
||||
},{}],2:[function(require,module,exports){
|
||||
"use strict";
|
||||
@ -10712,10 +10712,11 @@ var BaseProvider = /** @class */ (function (_super) {
|
||||
if (confirmations == null) {
|
||||
confirmations = 1;
|
||||
}
|
||||
if (confirmations === 0) {
|
||||
return this.getTransactionReceipt(transactionHash);
|
||||
return this.getTransactionReceipt(transactionHash).then(function (receipt) {
|
||||
if (confirmations === 0 || (receipt && receipt.confirmations >= confirmations)) {
|
||||
return receipt;
|
||||
}
|
||||
return new Promise(function (resolve) {
|
||||
return (new Promise(function (resolve) {
|
||||
var handler = function (receipt) {
|
||||
if (receipt.confirmations < confirmations) {
|
||||
return;
|
||||
@ -10724,6 +10725,7 @@ var BaseProvider = /** @class */ (function (_super) {
|
||||
resolve(receipt);
|
||||
};
|
||||
_this.on(transactionHash, handler);
|
||||
}));
|
||||
});
|
||||
};
|
||||
BaseProvider.prototype.getBlockNumber = function () {
|
||||
@ -11998,7 +12000,7 @@ var JsonRpcSigner = /** @class */ (function (_super) {
|
||||
}
|
||||
return _this.provider._wrapTransaction(tx, hash);
|
||||
});
|
||||
}, { onceBlock: _this.provider }).catch(function (error) {
|
||||
}, { fastRetry: 250, onceBlock: _this.provider }).catch(function (error) {
|
||||
error.transactionHash = hash;
|
||||
throw error;
|
||||
});
|
||||
@ -16918,6 +16920,7 @@ function poll(func, options) {
|
||||
}
|
||||
}, options.timeout);
|
||||
}
|
||||
var fastTimeout = options.fastRetry || null;
|
||||
var attempt = 0;
|
||||
function check() {
|
||||
return func().then(function (result) {
|
||||
@ -16940,6 +16943,12 @@ function poll(func, options) {
|
||||
if (timeout > options.ceiling) {
|
||||
timeout = options.ceiling;
|
||||
}
|
||||
// Fast Timeout, means we quickly try again the first time
|
||||
if (fastTimeout) {
|
||||
attempt--;
|
||||
timeout = fastTimeout;
|
||||
fastTimeout = null;
|
||||
}
|
||||
setTimeout(check, timeout);
|
||||
}
|
||||
return null;
|
||||
|
2
dist/ethers.min.js
vendored
2
dist/ethers.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/ethers.min.js.map
vendored
2
dist/ethers.min.js.map
vendored
File diff suppressed because one or more lines are too long
3
dist/ethers.types.txt
vendored
3
dist/ethers.types.txt
vendored
@ -266,7 +266,7 @@ declare module 'ethers/utils/shims' {
|
||||
}
|
||||
|
||||
declare module 'ethers/_version' {
|
||||
export const version = "4.0.25";
|
||||
export const version = "4.0.26";
|
||||
}
|
||||
|
||||
declare module 'ethers/utils/bignumber' {
|
||||
@ -1041,6 +1041,7 @@ declare module 'ethers/utils/web' {
|
||||
ceiling?: number;
|
||||
interval?: number;
|
||||
onceBlock?: OnceBlockable;
|
||||
fastRetry?: number;
|
||||
};
|
||||
export function fetchJson(connection: string | ConnectionInfo, json: string, processFunc: (value: any) => any): Promise<any>;
|
||||
export function poll(func: () => Promise<any>, options?: PollOptions): Promise<any>;
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ethers",
|
||||
"version": "4.0.25",
|
||||
"version": "4.0.26",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ethers",
|
||||
"version": "4.0.25",
|
||||
"version": "4.0.26",
|
||||
"description": "Ethereum wallet library.",
|
||||
"main": "./index.js",
|
||||
"types": "./index.d.ts",
|
||||
|
@ -656,10 +656,11 @@ var BaseProvider = /** @class */ (function (_super) {
|
||||
if (confirmations == null) {
|
||||
confirmations = 1;
|
||||
}
|
||||
if (confirmations === 0) {
|
||||
return this.getTransactionReceipt(transactionHash);
|
||||
return this.getTransactionReceipt(transactionHash).then(function (receipt) {
|
||||
if (confirmations === 0 || (receipt && receipt.confirmations >= confirmations)) {
|
||||
return receipt;
|
||||
}
|
||||
return new Promise(function (resolve) {
|
||||
return (new Promise(function (resolve) {
|
||||
var handler = function (receipt) {
|
||||
if (receipt.confirmations < confirmations) {
|
||||
return;
|
||||
@ -668,6 +669,7 @@ var BaseProvider = /** @class */ (function (_super) {
|
||||
resolve(receipt);
|
||||
};
|
||||
_this.on(transactionHash, handler);
|
||||
}));
|
||||
});
|
||||
};
|
||||
BaseProvider.prototype.getBlockNumber = function () {
|
||||
|
@ -155,7 +155,7 @@ var JsonRpcSigner = /** @class */ (function (_super) {
|
||||
}
|
||||
return _this.provider._wrapTransaction(tx, hash);
|
||||
});
|
||||
}, { onceBlock: _this.provider }).catch(function (error) {
|
||||
}, { fastRetry: 250, onceBlock: _this.provider }).catch(function (error) {
|
||||
error.transactionHash = hash;
|
||||
throw error;
|
||||
});
|
||||
|
@ -1 +1 @@
|
||||
export const version = "4.0.25";
|
||||
export const version = "4.0.26";
|
||||
|
1
utils/web.d.ts
vendored
1
utils/web.d.ts
vendored
@ -17,6 +17,7 @@ export declare type PollOptions = {
|
||||
ceiling?: number;
|
||||
interval?: number;
|
||||
onceBlock?: OnceBlockable;
|
||||
fastRetry?: number;
|
||||
};
|
||||
export declare function fetchJson(connection: string | ConnectionInfo, json: string, processFunc: (value: any) => any): Promise<any>;
|
||||
export declare function poll(func: () => Promise<any>, options?: PollOptions): Promise<any>;
|
||||
|
@ -179,6 +179,7 @@ function poll(func, options) {
|
||||
}
|
||||
}, options.timeout);
|
||||
}
|
||||
var fastTimeout = options.fastRetry || null;
|
||||
var attempt = 0;
|
||||
function check() {
|
||||
return func().then(function (result) {
|
||||
@ -201,6 +202,12 @@ function poll(func, options) {
|
||||
if (timeout > options.ceiling) {
|
||||
timeout = options.ceiling;
|
||||
}
|
||||
// Fast Timeout, means we quickly try again the first time
|
||||
if (fastTimeout) {
|
||||
attempt--;
|
||||
timeout = fastTimeout;
|
||||
fastTimeout = null;
|
||||
}
|
||||
setTimeout(check, timeout);
|
||||
}
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user