Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ Released with 1.0.0-beta.37 code base.

### Removes

- Removing the underscore package
- Removing the underscore package

## [1.5.0]

Expand Down Expand Up @@ -463,7 +463,7 @@ Released with 1.0.0-beta.37 code base.
### Changed

- Not considering `tx.chainId` if `tx.common.customChain.chainId` is provided for `web3.eth.accounts.signTransaction` function (#4293)
- Added missing PromiEvent handler types (#4194)
- Added missing PromiEvent handler types (#4194)
- Updated README to include Webpack 5 angular support instructions (#4174)
- Updated the documentation for the `Web3.utils`, removed context for `_` (underscore lib) (#4403)
- Emit subscription id with connect event when creating a subscription (#4300)
Expand Down Expand Up @@ -544,3 +544,4 @@ Released with 1.0.0-beta.37 code base.

### Fixed
- Fix dead link in web3-eth.rst (#4916)
- Fix web3-core-method throws on `f.call = this.call` when intrinsic is frozen (#4918) (#4938)
14 changes: 7 additions & 7 deletions packages/web3-core-method/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Method.prototype.setRequestManager = function (requestManager, accounts) {

Method.prototype.createFunction = function (requestManager, accounts) {
var func = this.buildCall();
func.call = this.call;
Object.defineProperty(func, 'call', { configurable: true, writable: true, value: this.call });

this.setRequestManager(requestManager || this.requestManager, accounts || this.accounts);

Expand All @@ -85,7 +85,7 @@ Method.prototype.createFunction = function (requestManager, accounts) {

Method.prototype.attachToObject = function (obj) {
var func = this.buildCall();
func.call = this.call;
Object.defineProperty(func, 'call', { configurable: true, writable: true, value: this.call });
var name = this.name.split('.');
if (name.length > 1) {
obj[name[0]] = obj[name[0]] || {};
Expand Down Expand Up @@ -181,7 +181,7 @@ Method.prototype.formatOutput = function (result) {
Method.prototype.toPayload = function (args) {
var call = this.getCall(args);
var callback = this.extractCallback(args);

var params = this.formatInput(args);
this.validateArgs(params);

Expand Down Expand Up @@ -551,20 +551,20 @@ Method.prototype._confirmTransaction = function (defer, result, payload) {

// start watching for confirmation depending on the support features of the provider
var startWatching = function (existingReceipt) {
let blockHeaderArrived = false;
let blockHeaderArrived = false;

const startInterval = () => {
intervalId = setInterval(checkConfirmation.bind(null, existingReceipt, true), method.transactionPollingInterval);
};

// If provider do not support event subscription use polling
if(!this.requestManager.provider.on) {
return startInterval();
return startInterval();
}

// Subscribe to new block headers to look for tx receipt
_ethereumCall.subscribe('newBlockHeaders', function (err, blockHeader, sub) {
blockHeaderArrived = true;
blockHeaderArrived = true;

if (err || !blockHeader) {
// fall back to polling
Expand Down Expand Up @@ -706,7 +706,7 @@ Method.prototype.buildCall = function () {
// SENDS the SIGNED SIGNATURE
var sendSignedTx = function (sign) {

var signedPayload = { ... payload,
var signedPayload = { ... payload,
method: 'eth_sendRawTransaction',
params: [sign.rawTransaction]
};
Expand Down