Skip to content

Commit

Permalink
Merge branch '1.x' into wyatt/eth2-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
spacesailor24 committed Oct 21, 2020
2 parents 6e00031 + b3a7bc6 commit 1a8dd0f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ Released with 1.0.0-beta.37 code base.
## [1.3.1]

### Changed

- bump utils 0.10.0^ -> 0.12.0 (#3733)

### Removed
Expand All @@ -299,4 +300,6 @@ Released with 1.0.0-beta.37 code base.

### Fixed

- Fixed decoding bytes and string parameters for logs emitted with solc 0.4.x (#3724, #3738)
- Fix possible unhandled promise rejection when sending a transaction (#3708)
- Fixed decoding bytes and string parameters for logs emitted with solc 0.4.x (#3724, #3738)
- Grammar changes to inputAddressFormatter error message
2 changes: 1 addition & 1 deletion docs/web3-eth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ Example
// using the callback
web3.eth.sendTransaction({
from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe',
data: code // deploying a contracrt
data: code // deploying a contract
}, function(error, hash){
...
});
Expand Down
3 changes: 1 addition & 2 deletions packages/web3-core-helpers/src/formatters.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ var inputAddressFormatter = function (address) {
} else if (utils.isAddress(address)) {
return '0x' + address.toLowerCase().replace('0x', '');
}
throw new Error('Provided address "' + address + '" is invalid, the capitalization checksum test failed, or its an indrect IBAN address which can\'t be converted.');
throw new Error(`Provided address ${address} is invalid, the capitalization checksum test failed, or it's an indirect IBAN address which can't be converted.`);
};


Expand Down Expand Up @@ -508,4 +508,3 @@ module.exports = {
outputPostFormatter: outputPostFormatter,
outputSyncingFormatter: outputSyncingFormatter
};

9 changes: 7 additions & 2 deletions packages/web3-core-method/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -725,17 +725,22 @@ Method.prototype.buildCall = function () {
txOptions.common = method.defaultCommon;
}

return method.accounts.signTransaction(txOptions, wallet.privateKey)
method.accounts.signTransaction(txOptions, wallet.privateKey)
.then(sendSignedTx)
.catch(function (err) {
if (_.isFunction(defer.eventEmitter.listeners) && defer.eventEmitter.listeners('error').length) {
defer.eventEmitter.emit('error', err);
try {
defer.eventEmitter.emit('error', err);
} catch (err) {
// Ignore userland error prevent it to bubble up within web3.
}
defer.eventEmitter.removeAllListeners();
defer.eventEmitter.catch(function () {
});
}
defer.reject(err);
});
return;
}

// ETH_SIGN
Expand Down

0 comments on commit 1a8dd0f

Please sign in to comment.