From 7fea3668e60011fb4d3a14961f7b7c2d257b1873 Mon Sep 17 00:00:00 2001 From: Alvarez <140459501+prestoalvarez@users.noreply.github.com> Date: Mon, 8 Dec 2025 19:34:25 +0100 Subject: [PATCH] Update wallet.go --- accounts/usbwallet/wallet.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/accounts/usbwallet/wallet.go b/accounts/usbwallet/wallet.go index 0fd0415a9e..5997a2a676 100644 --- a/accounts/usbwallet/wallet.go +++ b/accounts/usbwallet/wallet.go @@ -338,14 +338,15 @@ func (w *wallet) selfDerive() { } // Device lock obtained, derive the next batch of accounts var ( - accs []accounts.Account - paths []accounts.DerivationPath - - nextPaths = append([]accounts.DerivationPath{}, w.deriveNextPaths...) - nextAddrs = append([]common.Address{}, w.deriveNextAddrs...) - + accs []accounts.Account + paths []accounts.DerivationPath 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 empty := false; !empty; { // Retrieve the next derived Ethereum account