diff --git a/api/s5/http.go b/api/s5/http.go index 1c35c75..bc8c2b3 100644 --- a/api/s5/http.go +++ b/api/s5/http.go @@ -338,13 +338,15 @@ func (h *HttpHandler) AccountRegister(jc jape.Context) { return } - err = h.portal.Accounts().AddPubkeyToAccount(*newAccount, request.Pubkey) + rawPubkey := hex.EncodeToString(decodedKey[1:]) + + err = h.portal.Accounts().AddPubkeyToAccount(*newAccount, rawPubkey) if err != nil { errored(errAccountRegisterErr) return } - jwt, err := h.portal.Accounts().LoginPubkey(request.Pubkey) + jwt, err := h.portal.Accounts().LoginPubkey(rawPubkey) if err != nil { errored(errAccountRegisterErr) return