debt-menu #115

Open
Alfred-mk wants to merge 74 commits from debt-menu into master
4 changed files with 6 additions and 6 deletions
Showing only changes of commit f61b56407b - Show all commits

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

1 flag flag_language_set 8 checks whether the user has set their prefered language
36 flag flag_low_swap_amount 43 this is set when the swap max limit is less than 0.1
37 flag flag_alias_unavailable 44 this is set when the preferred alias is not available
38 flag flag_swap_transaction 45 this is set when the transaction will involve performing a swap
39 flag flag_no_stable_vouchers 46 this is set when the user does not have a stable voucher