rename the flag to flag_no_stable_vouchers
This commit is contained in:
parent
16adfdaa8a
commit
f61b56407b
@ -119,7 +119,7 @@ func (h *MenuHandlers) CalculateCreditAndDebt(ctx context.Context, sym string, i
|
||||
l.AddDomain("default")
|
||||
|
||||
flag_api_call_error, _ := h.flagManager.GetFlag("flag_api_call_error")
|
||||
flag_no_pay_debt_vouchers, _ := h.flagManager.GetFlag("flag_no_pay_debt_vouchers")
|
||||
flag_no_stable_vouchers, _ := h.flagManager.GetFlag("flag_no_stable_vouchers")
|
||||
|
||||
// default response
|
||||
res.FlagReset = append(res.FlagReset, flag_api_call_error)
|
||||
@ -161,11 +161,11 @@ func (h *MenuHandlers) CalculateCreditAndDebt(ctx context.Context, sym string, i
|
||||
|
||||
// No stable vouchers → cannot pay debt
|
||||
if len(filteredSwappableVouchers) == 0 {
|
||||
res.FlagSet = append(res.FlagSet, flag_no_pay_debt_vouchers)
|
||||
res.FlagSet = append(res.FlagSet, flag_no_stable_vouchers)
|
||||
return res, nil
|
||||
}
|
||||
|
||||
res.FlagReset = append(res.FlagReset, flag_no_pay_debt_vouchers)
|
||||
res.FlagReset = append(res.FlagReset, flag_no_stable_vouchers)
|
||||
|
||||
// Process stable vouchers for later use
|
||||
data := store.ProcessVouchers(filteredSwappableVouchers)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
CATCH no_voucher flag_no_active_voucher 1
|
||||
CATCH no_stable_voucher flag_no_pay_debt_vouchers 1
|
||||
CATCH no_stable_voucher flag_no_stable_vouchers 1
|
||||
LOAD calculate_max_pay_debt 0
|
||||
RELOAD calculate_max_pay_debt
|
||||
MAP calculate_max_pay_debt
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
CATCH no_voucher flag_no_active_voucher 1
|
||||
CATCH no_stable_voucher flag_no_pay_debt_vouchers 1
|
||||
CATCH no_stable_voucher flag_no_stable_vouchers 1
|
||||
LOAD get_pool_deposit_vouchers 0
|
||||
MAP get_pool_deposit_vouchers
|
||||
MOUT back 0
|
||||
|
||||
@ -36,4 +36,4 @@ flag,flag_incorrect_pool,42,this is set when the user selects an invalid pool
|
||||
flag,flag_low_swap_amount,43,this is set when the swap max limit is less than 0.1
|
||||
flag,flag_alias_unavailable,44,this is set when the preferred alias is not available
|
||||
flag,flag_swap_transaction,45,this is set when the transaction will involve performing a swap
|
||||
flag,flag_no_pay_debt_vouchers,46,this is set when the user does not have a stable voucher to pay debt
|
||||
flag,flag_no_stable_vouchers,46,this is set when the user does not have a stable voucher
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user