fix: need to pass the pubkey without the prefix and encoded to hex
This commit is contained in:
parent
accffade40
commit
bc5957f881
|
@ -338,13 +338,15 @@ func (h *HttpHandler) AccountRegister(jc jape.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
err = h.portal.Accounts().AddPubkeyToAccount(*newAccount, request.Pubkey)
|
rawPubkey := hex.EncodeToString(decodedKey[1:])
|
||||||
|
|
||||||
|
err = h.portal.Accounts().AddPubkeyToAccount(*newAccount, rawPubkey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errored(errAccountRegisterErr)
|
errored(errAccountRegisterErr)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
jwt, err := h.portal.Accounts().LoginPubkey(request.Pubkey)
|
jwt, err := h.portal.Accounts().LoginPubkey(rawPubkey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errored(errAccountRegisterErr)
|
errored(errAccountRegisterErr)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue