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
|
||||
}
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue