diff options
author | Guillaume Ballet <gballet@gmail.com> | 2019-07-18 20:17:32 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2019-07-18 20:17:32 +0800 |
commit | 9466b9eec5d7fdff0a43e82e89a3d6fb7aa571a6 (patch) | |
tree | 73d9eda16e3afe1a99348985c6c52e3a5240e597 | |
parent | 4ac04ae0feba560e93f0fad55772b8830b759d1b (diff) | |
download | go-tangerine-9466b9eec5d7fdff0a43e82e89a3d6fb7aa571a6.tar go-tangerine-9466b9eec5d7fdff0a43e82e89a3d6fb7aa571a6.tar.gz go-tangerine-9466b9eec5d7fdff0a43e82e89a3d6fb7aa571a6.tar.bz2 go-tangerine-9466b9eec5d7fdff0a43e82e89a3d6fb7aa571a6.tar.lz go-tangerine-9466b9eec5d7fdff0a43e82e89a3d6fb7aa571a6.tar.xz go-tangerine-9466b9eec5d7fdff0a43e82e89a3d6fb7aa571a6.tar.zst go-tangerine-9466b9eec5d7fdff0a43e82e89a3d6fb7aa571a6.zip |
signer/core: fix reference issue in key derivation (#19827)
* signer/core: fix reference issue in key derivation
* Review feedback
-rw-r--r-- | accounts/usbwallet/wallet.go | 3 |
1 files changed, 2 insertions, 1 deletions
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 } |