Compare commits

..

No commits in common. "ed632248c5369d0a1bf6084f4620bab18f9195c6" and "91cd6077cefdbf95e1af0d3f584ce5a1e3cf2c5b" have entirely different histories.

9 changed files with 4 additions and 29 deletions

View File

@ -122,7 +122,6 @@ func (ls *LocalHandlerService) GetHandler(accountService remote.AccountServiceIn
ls.DbRs.AddLocalFunc("get_transactions", ussdHandlers.GetTransactionsList)
ls.DbRs.AddLocalFunc("view_statement", ussdHandlers.ViewTransactionStatement)
ls.DbRs.AddLocalFunc("update_all_profile_items", ussdHandlers.UpdateAllProfileItems)
ls.DbRs.AddLocalFunc("set_back", ussdHandlers.SetBack)
return ussdHandlers, nil
}

View File

@ -726,18 +726,6 @@ func (h *Handlers) ResetIncorrectPin(ctx context.Context, sym string, input []by
return res, nil
}
// Setback sets the flag_back_set flag when the navigation is back
func (h *Handlers) SetBack(ctx context.Context, sym string, input []byte) (resource.Result, error) {
var res resource.Result
//TODO:
//Add check if the navigation is lateral nav instead of checking the input.
if string(input) == "0" {
flag_back_set, _ := h.flagManager.GetFlag("flag_back_set")
res.FlagSet = append(res.FlagSet, flag_back_set)
}
return res, nil
}
// CheckAccountStatus queries the API using the TrackingId and sets flags
// based on the account status
func (h *Handlers) CheckAccountStatus(ctx context.Context, sym string, input []byte) (resource.Result, error) {
@ -1344,9 +1332,6 @@ func (h *Handlers) GetCurrentProfileInfo(ctx context.Context, sym string, input
flag_gender_set, _ := h.flagManager.GetFlag("flag_gender_set")
flag_location_set, _ := h.flagManager.GetFlag("flag_location_set")
flag_offerings_set, _ := h.flagManager.GetFlag("flag_offerings_set")
flag_back_set, _ := h.flagManager.GetFlag("flag_back_set")
res.FlagReset = append(res.FlagReset, flag_back_set)
sessionId, ok := ctx.Value("SessionId").(string)
if !ok {
@ -2032,7 +2017,6 @@ func (h *Handlers) insertProfileItems(ctx context.Context, sessionId string, res
return nil
}
// UpdateAllProfileItems is used to persist all the new profile information and setup the required profile flags
func (h *Handlers) UpdateAllProfileItems(ctx context.Context, sym string, input []byte) (resource.Result, error) {
var res resource.Result
sessionId, ok := ctx.Value("SessionId").(string)

View File

@ -5,10 +5,9 @@ RELOAD get_current_profile_info
MAP get_current_profile_info
MOUT back 0
HALT
RELOAD set_back
CATCH _ flag_back_set 1
LOAD save_familyname 64
RELOAD save_familyname
INCMP _ 0
CATCH pin_entry flag_familyname_set 1
CATCH select_gender flag_gender_set 0
CATCH edit_yob flag_yob_set 0

View File

@ -5,8 +5,7 @@ RELOAD get_current_profile_info
MAP get_current_profile_info
MOUT back 0
HALT
RELOAD set_back
CATCH _ flag_back_set 1
INCMP _ 0
LOAD save_firstname 128
RELOAD save_firstname
CATCH pin_entry flag_firstname_set 1
@ -16,3 +15,4 @@ CATCH edit_yob flag_yob_set 0
CATCH edit_location flag_location_set 0
CATCH edit_offerings flag_offerings_set 0
CATCH pin_entry flag_firstname_set 0
INCMP edit_family_name *

View File

@ -5,8 +5,6 @@ RELOAD get_current_profile_info
LOAD save_location 16
MOUT back 0
HALT
RELOAD set_back
CATCH _ flag_back_set 1
RELOAD save_location
INCMP _ 0
CATCH pin_entry flag_location_set 1

View File

@ -5,8 +5,6 @@ RELOAD get_current_profile_info
LOAD save_offerings 8
MOUT back 0
HALT
RELOAD set_back
CATCH _ flag_back_set 1
RELOAD save_offerings
INCMP _ 0
CATCH pin_entry flag_offerings_set 1

View File

@ -11,7 +11,6 @@ MOUT edit_offerings 6
MOUT view 7
MOUT back 0
HALT
LOAD set_back 6
INCMP ^ 0
INCMP edit_first_name 1
INCMP edit_family_name 2

View File

@ -5,13 +5,12 @@ RELOAD get_current_profile_info
MAP get_current_profile_info
MOUT back 0
HALT
RELOAD set_back
CATCH _ flag_back_set 1
LOAD verify_yob 6
RELOAD verify_yob
CATCH incorrect_date_format flag_incorrect_date_format 1
LOAD save_yob 32
RELOAD save_yob
INCMP _ 0
CATCH pin_entry flag_yob_set 1
CATCH edit_location flag_location_set 0
CATCH edit_offerings flag_offerings_set 0

View File

@ -27,4 +27,3 @@ flag,flag_yob_set,33,this is set when the yob of the profile is set
flag,flag_gender_set,34,this is set when the gender of the profile is set
flag,flag_location_set,35,this is set when the location of the profile is set
flag,flag_offerings_set,36,this is set when the offerings of the profile is set
flag,flag_back_set,37,this is set when it is a back navigation

1 flag flag_language_set 8 checks whether the user has set their prefered language
27 flag flag_gender_set 34 this is set when the gender of the profile is set
28 flag flag_location_set 35 this is set when the location of the profile is set
29 flag flag_offerings_set 36 this is set when the offerings of the profile is set
flag flag_back_set 37 this is set when it is a back navigation