Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Ensure eth_sendTransaction is fully asynchronous #294

Merged
merged 4 commits into from
Feb 1, 2019
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
2 changes: 1 addition & 1 deletion lib/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Provider.prototype.send = function(payload, callback) {
.join("\n < ")
);
}
callback(response.error ? err : null, response);
process.nextTick(() => callback(response.error ? err : null, response));
};

if (self.options.verbose) {
Expand Down
9 changes: 2 additions & 7 deletions test/accounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,13 @@ describe("Accounts", function() {
value: web3.utils.toWei(new BN(1), "ether"),
gasLimit: 90000
},
function(err, tx) {
function(err) {
if (!err) {
return done(
new Error("We expected the account to be locked, which should throw an error when sending a transaction")
);
}
assert(
err.message.toLowerCase().indexOf("could not unlock signer account") >= 0,
"Expected error message containing \"could not unlock signer account\" " +
"(case insensitive check). Received the following error message, instead. " +
`"${err.message}"`
);
assert.strictEqual(err.message, "signer account is locked");
done();
}
);
Expand Down