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

Commit

Permalink
fix: Fork block number doesn't get populated (#5220)
Browse files Browse the repository at this point in the history
* Fork block number doesn\'t get propogated back from the chain instance

* Change the label for fork block number field
  • Loading branch information
jeffsmale90 authored Feb 6, 2023
1 parent 940de3e commit ad0770c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ class ServerScreen extends Component {
/>
</div>
<div className="RowItem">
<p>The URL of the block number to fork from, e.g., 56789</p>
<p>The block number to fork from, e.g., 56789</p>
</div>
</div>
</section>
Expand Down
3 changes: 1 addition & 2 deletions src/integrations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ class IntegrationManager extends EventEmitter {
try {
await this.flavor.startServer(settings, this.workspace.workspaceDirectory);
// just incase startServer mutates the settings, save them
// todo: not sure whether we still need to do this?
this.workspace.settings.setAll(settings);
this.workspace.settings.setAll(this.workspace.settings.getAll());

this.emit("server-started");
return true;
Expand Down
2 changes: 2 additions & 0 deletions static/node/chain/chain.ethereum.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,15 @@ async function startServer(options) {
dbLocation = ganacheOptions.database.dbPath;

const { mnemonic, hdPath } = ganacheOptions.wallet;
const fork_block_number = ganacheOptions.fork?.blockNumber;

// todo: what else do we need from options
const data = {
privateKeys,
addresses,
hdPath,
mnemonic,
fork_block_number,
dbLocation,
};

Expand Down

0 comments on commit ad0770c

Please sign in to comment.