Skip to content

Commit

Permalink
fix(security): address CVE-2021-23358
Browse files Browse the repository at this point in the history
Fixes hyperledger-cacti#1775

Signed-off-by: zondervancalvez <[email protected]>
  • Loading branch information
zondervancalvez committed Mar 25, 2022
1 parent 4a2553a commit 59486ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { createServer } from "http";
import KeyEncoder from "key-encoder";
import { AddressInfo } from "net";
import Web3 from "web3";
import EEAClient, { IWeb3InstanceExtended } from "web3-eea";
import Web3JsQuorum, { IWeb3Quorum } from "web3js-quorum";

import {
ApiServer,
Expand Down Expand Up @@ -128,7 +128,7 @@ test(testCase, async (t: Test) => {

const web3Provider = new Web3.providers.HttpProvider(rpcApiHttpHost);
const web3 = new Web3(web3Provider);
const web3Eea: IWeb3InstanceExtended = EEAClient(web3, 2018);
const Web3Quorum: IWeb3Quorum = Web3JsQuorum(web3);

const orionKeyPair = await besuTestLedger.getOrionKeyPair();
const besuKeyPair = await besuTestLedger.getBesuKeyPair();
Expand All @@ -147,7 +147,9 @@ test(testCase, async (t: Test) => {
privateKey: besuPrivateKey,
};

const transactionHash = await web3Eea.eea.sendRawTransaction(contractOptions);
const transactionHash = await Web3Quorum.priv.generateAndSendRawTransaction(
contractOptions,
);
await web3.eth.getTransaction(transactionHash);

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { createServer } from "http";
import KeyEncoder from "key-encoder";
import { AddressInfo } from "net";
import Web3 from "web3";
import EEAClient, { IWeb3InstanceExtended } from "web3-eea";
import Web3JsQuorum, { IWeb3Quorum } from "web3js-quorum";

import {
ApiServer,
Expand Down Expand Up @@ -128,7 +128,7 @@ test(testCase, async (t: Test) => {

const web3Provider = new Web3.providers.HttpProvider(rpcApiHttpHost);
const web3 = new Web3(web3Provider);
const web3Eea: IWeb3InstanceExtended = EEAClient(web3, 2018);
const Web3Quorum: IWeb3Quorum = Web3JsQuorum(web3);

const orionKeyPair = await besuTestLedger.getOrionKeyPair();
const besuKeyPair = await besuTestLedger.getBesuKeyPair();
Expand All @@ -147,7 +147,9 @@ test(testCase, async (t: Test) => {
privateKey: besuPrivateKey,
};

const transactionHash = await web3Eea.eea.sendRawTransaction(contractOptions);
const transactionHash = await Web3Quorum.priv.generateAndSendRawTransaction(
contractOptions,
);

await web3.eth.getTransaction(transactionHash);

Expand Down

0 comments on commit 59486ff

Please sign in to comment.