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

Commit

Permalink
parse correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmurdoch committed Mar 14, 2023
1 parent d7b3e2d commit 80339a1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/environment/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { Resolver } = require("@truffle/resolver");
const Artifactor = require("@truffle/artifactor");
const Ganache = require("ganache");
const Provider = require("@truffle/provider");
const StreamingWeb3HttpProvider = require("@truffle/stream-provider");
const StreamingWeb3HttpProvider = require("@truffle/stream-provider").default;

const Environment = {
// It's important config is a Config object and not a vanilla object
Expand Down
2 changes: 1 addition & 1 deletion packages/provider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Web3 = require("web3");
const { createInterfaceAdapter } = require("@truffle/interface-adapter");
const wrapper = require("./wrapper");
const DEFAULT_NETWORK_CHECK_TIMEOUT = 5000;
const StreamingWeb3HttpProvider = require("@truffle/stream-provider");
const StreamingWeb3HttpProvider = require("@truffle/stream-provider").default;

module.exports = {
wrap: function (provider, options) {
Expand Down
2 changes: 1 addition & 1 deletion packages/stream-provider/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default class StreamingWeb3HttpProvider extends Web3HttpProvider {
let error = null;
let result: any = {};
const stream = response.data.pipe(
JSONStream.parse([true, { emitKey: true }])
JSONStream.parse([{ emitKey: true }])
);
try {
result = await new Promise((resolve, reject) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/stream-provider/test/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe("test", () => {
});
(it("handle giant traces", async () => {
const provider = new StreamingWeb3HttpProvider(`http://localhost:${PORT}`);
const result = await new Promise<any>((resolve, reject) => {
const { result } = await new Promise<any>((resolve, reject) => {
provider.send(
{
id: 1,
Expand Down

0 comments on commit 80339a1

Please sign in to comment.