Compare commits

..

No commits in common. "e832f46d2215bca129eda300c57540628a14236e" and "0791eb1f119cc383acef10b9e6eaff8abd915aa7" have entirely different histories.

5 changed files with 3 additions and 11 deletions

View File

@ -1403,7 +1403,7 @@ func (h *MenuHandlers) CheckAccountStatus(ctx context.Context, sym string, input
if err != nil {
res.FlagSet = append(res.FlagSet, flag_api_error)
logg.ErrorCtxf(ctx, "failed on TrackAccountStatus", "error", err)
return res, nil
return res, err
}
res.FlagReset = append(res.FlagReset, flag_api_error)
@ -1569,7 +1569,6 @@ func (h *MenuHandlers) ValidateRecipient(ctx context.Context, sym string, input
}
flag_invalid_recipient, _ := h.flagManager.GetFlag("flag_invalid_recipient")
flag_invalid_recipient_with_invite, _ := h.flagManager.GetFlag("flag_invalid_recipient_with_invite")
flag_api_error, _ := h.flagManager.GetFlag("flag_api_call_error")
recipient := string(input)
@ -1643,13 +1642,10 @@ func (h *MenuHandlers) ValidateRecipient(ctx context.Context, sym string, input
logg.InfoCtxf(ctx, "Resolving with fqdn alias", "alias", fqdn)
AliasAddress, err = h.accountService.CheckAliasAddress(ctx, fqdn)
if err == nil {
res.FlagReset = append(res.FlagReset, flag_api_error)
AliasAddressResult = AliasAddress.Address
continue
} else {
res.FlagSet = append(res.FlagSet, flag_api_error)
logg.ErrorCtxf(ctx, "failed to resolve alias", "alias", recipient, "error_alias_check", err)
return res, nil
}
}
}
@ -2042,7 +2038,6 @@ func (h *MenuHandlers) CheckVouchers(ctx context.Context, sym string, input []by
if !ok {
return res, fmt.Errorf("missing session")
}
flag_api_error, _ := h.flagManager.GetFlag("flag_api_call_error")
userStore := h.userdataStore
publicKey, err := userStore.ReadEntry(ctx, sessionId, storedb.DATA_PUBLIC_KEY)
@ -2054,10 +2049,8 @@ func (h *MenuHandlers) CheckVouchers(ctx context.Context, sym string, input []by
// Fetch vouchers from the API using the public key
vouchersResp, err := h.accountService.FetchVouchers(ctx, string(publicKey))
if err != nil {
res.FlagSet = append(res.FlagSet, flag_api_error)
return res, nil
}
res.FlagReset = append(res.FlagReset, flag_api_error)
logg.InfoCtxf(ctx, "fetched user vouchers", "public_key", string(publicKey), "vouchers", vouchersResp)

View File

@ -6,6 +6,7 @@ MOUT back 0
HALT
LOAD validate_amount 64
RELOAD validate_amount
CATCH api_failure flag_api_call_error 1
CATCH invalid_amount flag_invalid_amount 1
INCMP _ 0
LOAD get_recipient 0

View File

@ -1,5 +1,5 @@
MOUT retry 1
MOUT quit 9
HALT
INCMP ^ 1
INCMP _ 1
INCMP quit 9

View File

@ -4,7 +4,6 @@ LOAD set_default_voucher 8
RELOAD set_default_voucher
LOAD check_vouchers 10
RELOAD check_vouchers
CATCH api_failure flag_api_call_error 1
LOAD check_balance 128
RELOAD check_balance
CATCH api_failure flag_api_call_error 1

View File

@ -5,7 +5,6 @@ MOUT back 0
HALT
LOAD validate_recipient 50
RELOAD validate_recipient
CATCH api_failure flag_api_call_error 1
CATCH invalid_recipient flag_invalid_recipient 1
CATCH invite_recipient flag_invalid_recipient_with_invite 1
INCMP _ 0