From f5dbfe553d90ee2e57cf7371ff66486828ccfbea Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Sat, 12 Oct 2024 20:06:00 +0300 Subject: [PATCH] use the check_balance for the max_amount --- internal/handlers/handlerservice.go | 1 - services/registration/amount | 2 +- services/registration/amount.vis | 4 ++-- services/registration/amount_swa | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/internal/handlers/handlerservice.go b/internal/handlers/handlerservice.go index 3b79ea2..0d891f1 100644 --- a/internal/handlers/handlerservice.go +++ b/internal/handlers/handlerservice.go @@ -69,7 +69,6 @@ func (ls *LocalHandlerService) GetHandler() (*ussd.Handlers, error) { ls.DbRs.AddLocalFunc("check_balance", ussdHandlers.CheckBalance) ls.DbRs.AddLocalFunc("validate_recipient", ussdHandlers.ValidateRecipient) ls.DbRs.AddLocalFunc("transaction_reset", ussdHandlers.TransactionReset) - ls.DbRs.AddLocalFunc("max_amount", ussdHandlers.MaxAmount) ls.DbRs.AddLocalFunc("validate_amount", ussdHandlers.ValidateAmount) ls.DbRs.AddLocalFunc("reset_transaction_amount", ussdHandlers.ResetTransactionAmount) ls.DbRs.AddLocalFunc("get_recipient", ussdHandlers.GetRecipient) diff --git a/services/registration/amount b/services/registration/amount index 9142aba..d3e8602 100644 --- a/services/registration/amount +++ b/services/registration/amount @@ -1,2 +1,2 @@ -Maximum amount: {{.max_amount}} +Maximum amount: {{.check_balance}} Enter amount: \ No newline at end of file diff --git a/services/registration/amount.vis b/services/registration/amount.vis index b491fab..5a02ff9 100644 --- a/services/registration/amount.vis +++ b/services/registration/amount.vis @@ -1,6 +1,6 @@ LOAD reset_transaction_amount 0 -LOAD max_amount 10 -MAP max_amount +LOAD check_balance 48 +MAP check_balance MOUT back 0 HALT LOAD validate_amount 64 diff --git a/services/registration/amount_swa b/services/registration/amount_swa index 0c8cf01..d071f63 100644 --- a/services/registration/amount_swa +++ b/services/registration/amount_swa @@ -1,2 +1,2 @@ -Kiwango cha juu: {{.max_amount}} +Kiwango cha juu: {{.check_balance}} Weka kiwango: \ No newline at end of file