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