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

* signer/core: fix reference issue in key derivation

* Review feedback
This commit is contained in:
Daniel Liu 2025-01-14 10:56:09 +08:00
parent 587f6b3438
commit f571689bab

View file

@ -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
}