From cb0f4eab795b24a3e5bce258926f63299da0b2e3 Mon Sep 17 00:00:00 2001 From: Jeff Smale <6363749+jeffsmale90@users.noreply.github.com> Date: Thu, 26 Jan 2023 11:40:20 +1300 Subject: [PATCH 1/2] Fork block number doesn\'t get propogated back from the chain instance --- src/integrations/index.js | 3 +-- static/node/chain/chain.ethereum.js | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/integrations/index.js b/src/integrations/index.js index 50619471f..7730e940b 100644 --- a/src/integrations/index.js +++ b/src/integrations/index.js @@ -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; diff --git a/static/node/chain/chain.ethereum.js b/static/node/chain/chain.ethereum.js index ba649b0ea..d8d546eaa 100644 --- a/static/node/chain/chain.ethereum.js +++ b/static/node/chain/chain.ethereum.js @@ -152,6 +152,7 @@ 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 = { @@ -159,6 +160,7 @@ async function startServer(options) { addresses, hdPath, mnemonic, + fork_block_number, dbLocation, }; From 1e672a0e759706173f1ba929b52fde44cecd2856 Mon Sep 17 00:00:00 2001 From: Jeff Smale <6363749+jeffsmale90@users.noreply.github.com> Date: Thu, 26 Jan 2023 14:37:16 +1300 Subject: [PATCH 2/2] Change the label for fork block number field --- .../renderer/screens/config/ConfigScreens/ServerScreen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integrations/ethereum/renderer/screens/config/ConfigScreens/ServerScreen.js b/src/integrations/ethereum/renderer/screens/config/ConfigScreens/ServerScreen.js index 3b94789b4..fd2218e3a 100644 --- a/src/integrations/ethereum/renderer/screens/config/ConfigScreens/ServerScreen.js +++ b/src/integrations/ethereum/renderer/screens/config/ConfigScreens/ServerScreen.js @@ -454,7 +454,7 @@ class ServerScreen extends Component { />
-

The URL of the block number to fork from, e.g., 56789

+

The block number to fork from, e.g., 56789