add a CATCH for low amounts and API errors

This commit is contained in:
Alfred Kamanda 2026-02-20 09:41:03 +03:00
parent 3108cb2f22
commit bfef77e20e
Signed by: Alfred-mk
GPG Key ID: 7EA3D01708908703
4 changed files with 12 additions and 1 deletions

View File

@ -10,6 +10,9 @@ INCMP > 88
INCMP < 98
INCMP _ 0
INCMP quit 99
LOAD get_mpesa_max_limit 0
LOAD get_mpesa_max_limit 89
RELOAD get_mpesa_max_limit
CATCH . flag_incorrect_voucher 1
CATCH low_withdraw_mpesa_amount flag_low_swap_amount 1
CATCH low_withdraw_mpesa_amount flag_api_call_error 1
INCMP mpesa_max_limit *

View File

@ -0,0 +1 @@
Available amount {{.get_mpesa_max_limit}} is too low, please choose a different voucher:

View File

@ -0,0 +1,6 @@
MAP get_mpesa_max_limit
MOUT back 0
MOUT quit 9
HALT
INCMP _ 0
INCMP quit 9

View File

@ -0,0 +1 @@
Kiasi kinachopatikana {{.get_mpesa_max_limit}} ni cha chini sana, tafadhali chagua sarafu tofauti: