From 9466b9eec5d7fdff0a43e82e89a3d6fb7aa571a6 Mon Sep 17 00:00:00 2001 From: Guillaume Ballet Date: Thu, 18 Jul 2019 14:17:32 +0200 Subject: [PATCH] signer/core: fix reference issue in key derivation (#19827) * signer/core: fix reference issue in key derivation * Review feedback --- accounts/usbwallet/wallet.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accounts/usbwallet/wallet.go b/accounts/usbwallet/wallet.go index ed786d9b4..ee539d965 100644 --- a/accounts/usbwallet/wallet.go +++ b/accounts/usbwallet/wallet.go @@ -479,7 +479,8 @@ func (w *wallet) Derive(path accounts.DerivationPath, pin bool) (accounts.Accoun if _, ok := w.paths[address]; !ok { w.accounts = append(w.accounts, account) - w.paths[address] = path + w.paths[address] = make(accounts.DerivationPath, len(path)) + copy(w.paths[address], path) } return account, nil }