Skip to content

Commit

Permalink
Merge pull request #3540 from OriginTrail/fix/not-setting-stake-on-st…
Browse files Browse the repository at this point in the history
…artup

Dont set stake on startup testnet
  • Loading branch information
Mihajlo-Pavlovic authored Dec 19, 2024
2 parents b23b51d + 74b5b80 commit 4a3c055
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions ot-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,18 +183,15 @@ class OTNode {

if (
process.env.NODE_ENV === 'development' ||
process.env.NODE_ENV === 'test' ||
process.env.NODE_ENV === 'testnet'
process.env.NODE_ENV === 'test'
) {
const blockchainConfig =
blockchainModuleManager.getModuleConfiguration(blockchain);
if (process.env.NODE_ENV !== 'testnet') {
execSync(
`npm run set-stake -- --rpcEndpoint=${blockchainConfig.rpcEndpoints[0]} --stake=${blockchainConfig.initialStakeAmount} --operationalWalletPrivateKey=${blockchainConfig.operationalWallets[0].privateKey} --managementWalletPrivateKey=${blockchainConfig.evmManagementWalletPrivateKey} --hubContractAddress=${blockchainConfig.hubContractAddress}`,
{ stdio: 'inherit' },
);
await setTimeout(10000);
}
execSync(
`npm run set-stake -- --rpcEndpoint=${blockchainConfig.rpcEndpoints[0]} --stake=${blockchainConfig.initialStakeAmount} --operationalWalletPrivateKey=${blockchainConfig.operationalWallets[0].privateKey} --managementWalletPrivateKey=${blockchainConfig.evmManagementWalletPrivateKey} --hubContractAddress=${blockchainConfig.hubContractAddress}`,
{ stdio: 'inherit' },
);
await setTimeout(10000);
execSync(
`npm run set-ask -- --rpcEndpoint=${blockchainConfig.rpcEndpoints[0]} --ask=${blockchainConfig.initialAskAmount} --privateKey=${blockchainConfig.operationalWallets[0].privateKey} --hubContractAddress=${blockchainConfig.hubContractAddress}`,
{ stdio: 'inherit' },
Expand Down

0 comments on commit 4a3c055

Please sign in to comment.