Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
0x-r4bbit committed Feb 11, 2020
1 parent c08b658 commit e829ed3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
4 changes: 1 addition & 3 deletions packages/embark/src/cmd/cmd_controller.js
Expand Up @@ -370,9 +370,7 @@ class EmbarkController {
engine.registerModulePackage('embark-deploy-tracker', {
plugins: engine.plugins
});
engine.registerModulePackage('embark-scripts-runner', {
plugins: engine.plugins
});
engine.registerModulePackage('embark-scripts-runner');

engine.startEngine(async (err) => {
if (err) {
Expand Down
16 changes: 0 additions & 16 deletions packages/plugins/scripts-runner/src/index.ts
Expand Up @@ -92,22 +92,6 @@ export default class ScriptsRunnerPlugin {
})();
}

get block() {
return (async () => {
if (this._block) {
return this._block;
}
const web3 = await this.web3;
try {
this._block = await web3.eth.getBlock(0, true);
} catch (err) {
// Retry with block 1 (Block 0 fails with Ganache-cli using the --fork option)
this._block = await web3.eth.getBlock(1, true);
}
return this._block;
})();
}

private async execute(target: string, forceTracking = false, callback: Callback<any>) {
const targetPath = !path.isAbsolute(target) ? dappPath(target) : target;
try {
Expand Down

0 comments on commit e829ed3

Please sign in to comment.