Skip to content

Commit d0c1ea4

Browse files
committed
fix: use initialIndex
1 parent 72726b7 commit d0c1ea4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packages/data-edge/hardhat.config.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,8 @@ function getAccountMnemonic() {
6161
return process.env.MNEMONIC || ''
6262
}
6363

64-
function getAccountPath() {
65-
const index = process.env.ACCOUNT_INDEX ? parseInt(process.env.ACCOUNT_INDEX) : 0
66-
const hdPath = `m/44'/60'/0'/0/${index}`
67-
return hdPath
64+
function getAccountIndex() {
65+
return process.env.ACCOUNT_INDEX ? parseInt(process.env.ACCOUNT_INDEX) : 0
6866
}
6967

7068
function getDefaultProviderURL(network: string) {
@@ -80,7 +78,8 @@ function setupDefaultNetworkProviders(buidlerConfig) {
8078
gasPrice: netConfig.gasPrice || 'auto',
8179
accounts: {
8280
mnemonic: getAccountMnemonic(),
83-
path: getAccountPath(),
81+
path: "m/44'/60'/0'/0",
82+
initialIndex: getAccountIndex(),
8483
},
8584
}
8685
}

0 commit comments

Comments
 (0)