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

Commit

Permalink
fix json rpc call
Browse files Browse the repository at this point in the history
  • Loading branch information
rymnc committed Sep 2, 2020
1 parent be2bffe commit 8b7697f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/forking/forking.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,12 @@ describe("Forking", function() {

it("should unlock any account after server has been started", async() => {
const address = "0x742d35Cc6634C0532925a3b844Bc454e4438f44e";
const firstUnlock = await forkedWeb3.send("debug_unlockAccount", [address]);
assert.strictEqual(firstUnlock, true);
const secondUnlock = await forkedWeb3.send("debug_unlockAccount", [address]);
assert.strictEqual(secondUnlock, "Account Already Unlocked");
forkedWeb3.currentProvider.send({"jsonrpc":"2.0","method":"debug_unlockAccount","params":[address],"id":42}, (err, res) => {
assert.strictEqual(res.result, true);
});
forkedWeb3.currentProvider.send({"jsonrpc":"2.0","method":"debug_unlockAccount","params":[address],"id":42}, (err, res) => {
assert.strictEqual(res.result, "Account Already Unlocked");
});
});

it("should execute calls against a contract on the forked provider via the main provider", async() => {
Expand Down

0 comments on commit 8b7697f

Please sign in to comment.