From 3834ac098f53163c966fc50e335a78cd6cc3311d Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Sat, 21 Nov 2020 00:16:17 +0530 Subject: [PATCH] provider export improved --- libs/remix-simulator/src/index.ts | 2 +- libs/remix-simulator/test/accounts.ts | 4 ++-- libs/remix-simulator/test/blocks.ts | 4 ++-- libs/remix-simulator/test/misc.ts | 4 ++-- libs/remix-simulator/tsconfig.lib.json | 2 +- tsconfig.json | 2 +- workspace.json | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libs/remix-simulator/src/index.ts b/libs/remix-simulator/src/index.ts index d09d8216a8..042022eef5 100644 --- a/libs/remix-simulator/src/index.ts +++ b/libs/remix-simulator/src/index.ts @@ -1,3 +1,3 @@ import { Provider } from './provider' -export default { Provider } +export { Provider } diff --git a/libs/remix-simulator/test/accounts.ts b/libs/remix-simulator/test/accounts.ts index 28c4dffbba..c31f6d0f83 100644 --- a/libs/remix-simulator/test/accounts.ts +++ b/libs/remix-simulator/test/accounts.ts @@ -1,12 +1,12 @@ /* global describe, before, it */ import Web3 from 'web3' -import RemixSim from '../src/index' +import { Provider } from '../src/index' const web3 = new Web3() import * as assert from 'assert' describe('Accounts', () => { before(function () { - const provider: any = new RemixSim.Provider() + const provider: any = new Provider() web3.setProvider(provider) }) diff --git a/libs/remix-simulator/test/blocks.ts b/libs/remix-simulator/test/blocks.ts index 300774c79a..de81cddc9c 100644 --- a/libs/remix-simulator/test/blocks.ts +++ b/libs/remix-simulator/test/blocks.ts @@ -1,12 +1,12 @@ /* global describe, before, it */ import Web3 from 'web3' -import RemixSim from '../src/index' +import { Provider } from '../src/index' const web3 = new Web3() import * as assert from 'assert' describe('blocks', () => { before(() => { - const provider: any = new RemixSim.Provider({ + const provider: any = new Provider({ coinbase: '0x0000000000000000000000000000000000000001' }) web3.setProvider(provider) diff --git a/libs/remix-simulator/test/misc.ts b/libs/remix-simulator/test/misc.ts index 8ccefbc27e..4b8075cca4 100644 --- a/libs/remix-simulator/test/misc.ts +++ b/libs/remix-simulator/test/misc.ts @@ -1,12 +1,12 @@ /* global describe, before, it */ import Web3 from 'web3' -import RemixSim from '../src/index' +import { Provider } from '../src/index' const web3 = new Web3() import * as assert from 'assert' describe('Misc', () => { before(() => { - const provider: any = new RemixSim.Provider() + const provider: any = new Provider() web3.setProvider(provider) }) diff --git a/libs/remix-simulator/tsconfig.lib.json b/libs/remix-simulator/tsconfig.lib.json index dcbbfc63c2..dee88a7513 100644 --- a/libs/remix-simulator/tsconfig.lib.json +++ b/libs/remix-simulator/tsconfig.lib.json @@ -4,7 +4,7 @@ "module": "commonjs", "outDir": "../../dist/out-tsc", "declaration": true, - "rootDir": "./src", + "rootDir": ".", "types": ["node", "mocha"] }, "exclude": [ diff --git a/tsconfig.json b/tsconfig.json index dc73d2f01d..80761cf6d9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,7 +20,7 @@ "@remix-project/remix-astwalker": ["dist/libs/remix-astwalker/index.js"], "@remix-project/remix-debug": ["dist/libs/remix-debug/index.js"], "@remix-project/remix-lib": ["dist/libs/remix-lib/index.js"], - "@remix-project/remix-simulator": ["dist/libs/remix-simulator/index.js"], + "@remix-project/remix-simulator": ["dist/libs/remix-simulator/src/index.js"], "@remix-project/remix-solidity": ["dist/libs/remix-solidity/index.js"], "@remix-project/remix-tests": ["dist/libs/remix-tests/src/index.js"], "@remix-project/remix-url-resolver": ["dist/libs/remix-url-resolver/index.js"], diff --git a/workspace.json b/workspace.json index ea27de7ffd..46fa131140 100644 --- a/workspace.json +++ b/workspace.json @@ -292,7 +292,7 @@ }, "remix-simulator": { "root": "libs/remix-simulator", - "sourceRoot": "libs/remix-simulator/src", + "sourceRoot": "libs/remix-simulator", "projectType": "library", "schematics": {}, "architect": {