added validation for amount

This commit is contained in:
Alfred Kamanda 2024-08-22 15:01:30 +03:00
parent 075355980a
commit 32ba22c043
Signed by untrusted user: Alfred-mk
GPG Key ID: 7EA3D01708908703
6 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,4 @@
LOAD reset_transaction_amount 0
RELOAD validate_recipient
CATCH invalid_recipient 13 1
LOAD max_amount 10

View File

@ -0,0 +1,2 @@
Kiwango cha juu: {{.max_amount}}
Weka kiwango:

View File

@ -0,0 +1 @@
Amount {{.validate_amount}} is invalid, please try again:

View File

@ -0,0 +1,7 @@
MAP validate_amount
RELOAD reset_transaction_amount
MOUT retry 1
MOUT quit 9
HALT
INCMP amount 1
INCMP quit 9

View File

@ -0,0 +1 @@
Kiwango {{.validate_amount}} sio sahihi, tafadhali weka tena:

View File

@ -1,5 +1,6 @@
RELOAD validate_amount
MAP validate_amount
CATCH invalid_amount 17 1
RELOAD get_recipient
MAP get_recipient
RELOAD get_sender