Update wallet.go

This commit is contained in:
Alvarez 2025-12-08 19:34:25 +01:00 committed by GitHub
parent 0aedc0787f
commit 7fea3668e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -340,12 +340,13 @@ func (w *wallet) selfDerive() {
var ( var (
accs []accounts.Account accs []accounts.Account
paths []accounts.DerivationPath paths []accounts.DerivationPath
nextPaths = append([]accounts.DerivationPath{}, w.deriveNextPaths...)
nextAddrs = append([]common.Address{}, w.deriveNextAddrs...)
context = context.Background() context = context.Background()
nextAddrs = append([]common.Address{}, w.deriveNextAddrs...)
) )
nextPaths := make([]accounts.DerivationPath, len(w.deriveNextPaths))
for i, path := range w.deriveNextPaths {
nextPaths[i] = append(accounts.DerivationPath(nil), path...)
}
for i := 0; i < len(nextAddrs); i++ { for i := 0; i < len(nextAddrs); i++ {
for empty := false; !empty; { for empty := false; !empty; {
// Retrieve the next derived Ethereum account // Retrieve the next derived Ethereum account