signer/core: fix reference issue in key derivation (#19827)

* signer/core: fix reference issue in key derivation

* Review feedback
This commit is contained in:
Guillaume Ballet 2019-07-18 14:17:32 +02:00 committed by Péter Szilágyi
parent 4ac04ae0fe
commit 9466b9eec5
1 changed files with 2 additions and 1 deletions

View File

@ -479,7 +479,8 @@ func (w *wallet) Derive(path accounts.DerivationPath, pin bool) (accounts.Accoun
if _, ok := w.paths[address]; !ok { if _, ok := w.paths[address]; !ok {
w.accounts = append(w.accounts, account) 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 return account, nil
} }