ledger: Close device in WalletNew
This commit is contained in:
parent
4ac2bee81c
commit
8b648cf77c
@ -201,6 +201,7 @@ func (lw LedgerWallet) WalletNew(ctx context.Context, t types.KeyType) (address.
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return address.Undef, xerrors.Errorf("finding ledger: %w", err)
|
return address.Undef, xerrors.Errorf("finding ledger: %w", err)
|
||||||
}
|
}
|
||||||
|
defer fl.Close() // nolint:errcheck
|
||||||
|
|
||||||
path := append(append([]uint32(nil), filHDBasePath...), uint32(maxi+1))
|
path := append(append([]uint32(nil), filHDBasePath...), uint32(maxi+1))
|
||||||
_, _, addr, err := fl.GetAddressPubKeySECP256K1(path)
|
_, _, addr, err := fl.GetAddressPubKeySECP256K1(path)
|
||||||
|
Loading…
Reference in New Issue
Block a user