use the check_balance for the max_amount

This commit is contained in:
Alfred Kamanda 2024-10-12 20:06:00 +03:00
parent 7fe8f0b7d5
commit f5dbfe553d
Signed by untrusted user: Alfred-mk
GPG Key ID: 7EA3D01708908703
4 changed files with 4 additions and 5 deletions

View File

@ -69,7 +69,6 @@ func (ls *LocalHandlerService) GetHandler() (*ussd.Handlers, error) {
ls.DbRs.AddLocalFunc("check_balance", ussdHandlers.CheckBalance) ls.DbRs.AddLocalFunc("check_balance", ussdHandlers.CheckBalance)
ls.DbRs.AddLocalFunc("validate_recipient", ussdHandlers.ValidateRecipient) ls.DbRs.AddLocalFunc("validate_recipient", ussdHandlers.ValidateRecipient)
ls.DbRs.AddLocalFunc("transaction_reset", ussdHandlers.TransactionReset) ls.DbRs.AddLocalFunc("transaction_reset", ussdHandlers.TransactionReset)
ls.DbRs.AddLocalFunc("max_amount", ussdHandlers.MaxAmount)
ls.DbRs.AddLocalFunc("validate_amount", ussdHandlers.ValidateAmount) ls.DbRs.AddLocalFunc("validate_amount", ussdHandlers.ValidateAmount)
ls.DbRs.AddLocalFunc("reset_transaction_amount", ussdHandlers.ResetTransactionAmount) ls.DbRs.AddLocalFunc("reset_transaction_amount", ussdHandlers.ResetTransactionAmount)
ls.DbRs.AddLocalFunc("get_recipient", ussdHandlers.GetRecipient) ls.DbRs.AddLocalFunc("get_recipient", ussdHandlers.GetRecipient)

View File

@ -1,2 +1,2 @@
Maximum amount: {{.max_amount}} Maximum amount: {{.check_balance}}
Enter amount: Enter amount:

View File

@ -1,6 +1,6 @@
LOAD reset_transaction_amount 0 LOAD reset_transaction_amount 0
LOAD max_amount 10 LOAD check_balance 48
MAP max_amount MAP check_balance
MOUT back 0 MOUT back 0
HALT HALT
LOAD validate_amount 64 LOAD validate_amount 64

View File

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