Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
RetryProvider.prototype.perform = function (method, params) {
var _this = this;
return web_1.poll(function () {
return _this.provider.perform(method, params).then(function (result) {
return result;
}, function (error) {
return undefined;
});
}, this.options);
};
return RetryProvider;
perform(method: string, params: any): Promise {
return poll(() => {
return this.provider.perform(method, params).then((result) => {
return result
}, (error) => {
return undefined
});
}, this.options);
}
}
return this.sendUncheckedTransaction(transaction).then(function (hash) {
return web_1.poll(function () {
return _this.provider.getTransaction(hash).then(function (tx) {
if (tx === null) {
return undefined;
}
return _this.provider._wrapTransaction(tx, hash);
});
}, { onceBlock: _this.provider }).catch(function (error) {
error.transactionHash = hash;
throw error;
});
});
};
return this.sendUncheckedTransaction(transaction).then((hash) => {
return poll(() => {
return this.provider.getTransaction(hash).then((tx) => {
if (tx === null) {
return undefined;
}
return this.provider._wrapTransaction(tx, hash);
});
}, { onceBlock: this.provider }).catch((error) => {
error.transactionHash = hash;
throw error;
});
});
}