cleanup code

This commit is contained in:
Carlosokumu 2024-09-07 16:22:08 +03:00
parent 4c3f63a48f
commit be33b7458f
Signed by untrusted user: carlos
GPG Key ID: 7BD6BC8160A5C953

View File

@ -145,7 +145,6 @@ func (h *Handlers) createAccountNoExist(ctx context.Context, sessionId string, r
utils.DATA_PUBLIC_KEY: accountResp.Result.PublicKey, utils.DATA_PUBLIC_KEY: accountResp.Result.PublicKey,
utils.DATA_CUSTODIAL_ID: accountResp.Result.CustodialId.String(), utils.DATA_CUSTODIAL_ID: accountResp.Result.CustodialId.String(),
} }
for key, value := range data { for key, value := range data {
err := utils.WriteEntry(ctx, h.userdataStore, sessionId, key, []byte(value)) err := utils.WriteEntry(ctx, h.userdataStore, sessionId, key, []byte(value))
if err != nil { if err != nil {
@ -164,7 +163,6 @@ func (h *Handlers) createAccountNoExist(ctx context.Context, sessionId string, r
func (h *Handlers) CreateAccount(ctx context.Context, sym string, input []byte) (resource.Result, error) { func (h *Handlers) CreateAccount(ctx context.Context, sym string, input []byte) (resource.Result, error) {
var res resource.Result var res resource.Result
var err error var err error
sessionId, ok := ctx.Value("SessionId").(string) sessionId, ok := ctx.Value("SessionId").(string)
if !ok { if !ok {
return res, fmt.Errorf("missing session") return res, fmt.Errorf("missing session")