From f36847d9668b92ead9267fd8d20321eba9ab0046 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Wed, 23 Oct 2024 14:51:17 +0300 Subject: [PATCH] Added a placeholder function to get transactions --- internal/handlers/handlerservice.go | 1 + internal/handlers/ussd/menuhandler.go | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/internal/handlers/handlerservice.go b/internal/handlers/handlerservice.go index 708139b..c291268 100644 --- a/internal/handlers/handlerservice.go +++ b/internal/handlers/handlerservice.go @@ -94,6 +94,7 @@ func (ls *LocalHandlerService) GetHandler(accountService server.AccountServiceIn ls.DbRs.AddLocalFunc("confirm_pin_change", ussdHandlers.ConfirmPinChange) ls.DbRs.AddLocalFunc("quit_with_help", ussdHandlers.QuitWithHelp) ls.DbRs.AddLocalFunc("fetch_custodial_balances", ussdHandlers.FetchCustodialBalances) + ls.DbRs.AddLocalFunc("get_transactions", ussdHandlers.GetTransactions) return ussdHandlers, nil } diff --git a/internal/handlers/ussd/menuhandler.go b/internal/handlers/ussd/menuhandler.go index 36d1ad5..ec27fea 100644 --- a/internal/handlers/ussd/menuhandler.go +++ b/internal/handlers/ussd/menuhandler.go @@ -1045,3 +1045,12 @@ func (h *Handlers) GetProfileInfo(ctx context.Context, sym string, input []byte) return res, nil } + +// GetTransactions retrieves the transactions from the API using the "PublicKey" +func (h *Handlers) GetTransactions(ctx context.Context, sym string, input []byte) (resource.Result, error) { + var res resource.Result + + res.Content = "Transaction list" + + return res, nil +} \ No newline at end of file