Check the flag_no_active_voucher before proceeding

This commit is contained in:
Alfred Kamanda 2024-11-04 17:56:25 +03:00
parent 92ea3df4aa
commit 266d3d06c3
Signed by: Alfred-mk
GPG Key ID: 7EA3D01708908703
4 changed files with 5 additions and 3 deletions

View File

@ -1254,7 +1254,8 @@ func (h *Handlers) SetDefaultVoucher(ctx context.Context, sym string, input []by
// Fetch vouchers from the API using the public key // Fetch vouchers from the API using the public key
vouchersResp, err := h.accountService.FetchVouchers(ctx, string(publicKey)) vouchersResp, err := h.accountService.FetchVouchers(ctx, string(publicKey))
if err != nil { if err != nil {
return res, err res.FlagSet = append(res.FlagSet, flag_no_active_voucher)
return res, nil
} }
// Return if there is no voucher // Return if there is no voucher

View File

@ -1 +1 @@
You need a voucher to send You need a voucher to proceed

View File

@ -1 +1 @@
Unahitaji sarafu kutuma Unahitaji sarafu kuendelea

View File

@ -1,3 +1,4 @@
CATCH no_voucher flag_no_active_voucher 1
LOAD get_vouchers 0 LOAD get_vouchers 0
MAP get_vouchers MAP get_vouchers
MOUT back 0 MOUT back 0