Fix nitpick

This commit is contained in:
Aaron Buchwald 2020-06-15 14:20:16 -04:00
parent 2fb88906cc
commit 8783844aca
No known key found for this signature in database
GPG Key ID: C71A37CF7072977F
1 changed files with 1 additions and 2 deletions

View File

@ -668,9 +668,9 @@ func (service *Service) ImportKey(r *http.Request, args *ImportKeyArgs, reply *I
addresses, _ := user.Addresses(db)
newAddress := sk.PublicKey().Address()
reply.Address = service.vm.Format(newAddress.Bytes())
for _, address := range addresses {
if newAddress.Equals(address) {
reply.Address = service.vm.Format(newAddress.Bytes())
return nil
}
}
@ -680,7 +680,6 @@ func (service *Service) ImportKey(r *http.Request, args *ImportKeyArgs, reply *I
return fmt.Errorf("problem saving addresses: %w", err)
}
reply.Address = service.vm.Format(newAddress.Bytes())
return nil
}