Compare commits

...

6 Commits

Author SHA1 Message Date
eddadb6491
go to root on retry 2024-12-13 18:02:09 +03:00
b014cf0dcc
remove all non-incmp statements after HALT 2024-12-13 17:01:01 +03:00
a3d63e8bf5
use next node on profile edit 2024-12-13 09:15:01 +03:00
2c57535a4e
check for back 2024-12-12 15:48:54 +03:00
be9d039ef1
update go-vise dep 2024-12-12 15:47:40 +03:00
a799e19afc
remove check for '0' input 2024-12-12 15:47:07 +03:00
20 changed files with 79 additions and 92 deletions

2
go.mod
View File

@ -3,7 +3,7 @@ module git.grassecon.net/urdt/ussd
go 1.23.0 go 1.23.0
require ( require (
git.defalsify.org/vise.git v0.2.1-0.20241122120231-9e9ee5bdfa7a git.defalsify.org/vise.git v0.2.1-0.20241209194740-26fc82a76ede
github.com/alecthomas/assert/v2 v2.2.2 github.com/alecthomas/assert/v2 v2.2.2
github.com/gofrs/uuid v4.4.0+incompatible github.com/gofrs/uuid v4.4.0+incompatible
github.com/grassrootseconomics/eth-custodial v1.3.0-beta github.com/grassrootseconomics/eth-custodial v1.3.0-beta

2
go.sum
View File

@ -1,5 +1,7 @@
git.defalsify.org/vise.git v0.2.1-0.20241122120231-9e9ee5bdfa7a h1:LvGKktk0kUnuRN3nF9r15D8OoV0sFaMmQr52kGq2gtE= git.defalsify.org/vise.git v0.2.1-0.20241122120231-9e9ee5bdfa7a h1:LvGKktk0kUnuRN3nF9r15D8OoV0sFaMmQr52kGq2gtE=
git.defalsify.org/vise.git v0.2.1-0.20241122120231-9e9ee5bdfa7a/go.mod h1:jyBMe1qTYUz3mmuoC9JQ/TvFeW0vTanCUcPu3H8p4Ck= git.defalsify.org/vise.git v0.2.1-0.20241122120231-9e9ee5bdfa7a/go.mod h1:jyBMe1qTYUz3mmuoC9JQ/TvFeW0vTanCUcPu3H8p4Ck=
git.defalsify.org/vise.git v0.2.1-0.20241209194740-26fc82a76ede h1:BtooQZJDYEgeRKqv8RSxYSbW5jh0UIFJ6zRMEZZn0sc=
git.defalsify.org/vise.git v0.2.1-0.20241209194740-26fc82a76ede/go.mod h1:jyBMe1qTYUz3mmuoC9JQ/TvFeW0vTanCUcPu3H8p4Ck=
github.com/alecthomas/assert/v2 v2.2.2 h1:Z/iVC0xZfWTaFNE6bA3z07T86hd45Xe2eLt6WVy2bbk= github.com/alecthomas/assert/v2 v2.2.2 h1:Z/iVC0xZfWTaFNE6bA3z07T86hd45Xe2eLt6WVy2bbk=
github.com/alecthomas/assert/v2 v2.2.2/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= github.com/alecthomas/assert/v2 v2.2.2/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ=
github.com/alecthomas/participle/v2 v2.0.0 h1:Fgrq+MbuSsJwIkw3fEj9h75vDP0Er5JzepJ0/HNHv0g= github.com/alecthomas/participle/v2 v2.0.0 h1:Fgrq+MbuSsJwIkw3fEj9h75vDP0Er5JzepJ0/HNHv0g=

View File

@ -732,9 +732,7 @@ func (h *Handlers) ResetIncorrectPin(ctx context.Context, sym string, input []by
// Setback sets the flag_back_set flag when the navigation is back // 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) { func (h *Handlers) SetBack(ctx context.Context, sym string, input []byte) (resource.Result, error) {
var res resource.Result var res resource.Result
//TODO: if h.st.Back() {
//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") flag_back_set, _ := h.flagManager.GetFlag("flag_back_set")
res.FlagSet = append(res.FlagSet, flag_back_set) res.FlagSet = append(res.FlagSet, flag_back_set)
} }

View File

@ -1,18 +1,7 @@
CATCH incorrect_pin flag_incorrect_pin 1
CATCH update_familyname flag_allow_update 1
LOAD get_current_profile_info 0 LOAD get_current_profile_info 0
RELOAD get_current_profile_info RELOAD get_current_profile_info
MAP get_current_profile_info MAP get_current_profile_info
MOUT back 0 MOUT back 0
HALT HALT
RELOAD set_back INCMP _ 0
CATCH _ flag_back_set 1 INCMP edit_family_name_next *
LOAD save_familyname 64
RELOAD save_familyname
CATCH pin_entry flag_familyname_set 1
CATCH select_gender flag_gender_set 0
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_familyname_set 0
INCMP select_gender *

View File

@ -0,0 +1,11 @@
LOAD save_familyname 32
RELOAD save_familyname
CATCH incorrect_pin flag_incorrect_pin 1
CATCH update_familyname flag_allow_update 1
RELOAD set_back
CATCH _ flag_back_set 1
CATCH pin_entry flag_familyname_set 1
CATCH select_gender flag_gender_set 0
CATCH edit_yob flag_yob_set 0
CATCH edit_location flag_location_set 0
CATCH pin_entry flag_familyname_set 0

View File

@ -1,18 +1,7 @@
CATCH incorrect_pin flag_incorrect_pin 1
CATCH update_firstname flag_allow_update 1
LOAD get_current_profile_info 0 LOAD get_current_profile_info 0
RELOAD get_current_profile_info RELOAD get_current_profile_info
MAP get_current_profile_info MAP get_current_profile_info
MOUT back 0 MOUT back 0
HALT HALT
RELOAD set_back INCMP _ 0
CATCH _ flag_back_set 1 INCMP edit_first_name_next *
LOAD save_firstname 128
RELOAD save_firstname
CATCH pin_entry flag_firstname_set 1
CATCH edit_family_name flag_familyname_set 0
CATCH edit_gender flag_gender_set 0
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

View File

@ -0,0 +1,12 @@
LOAD save_firstname 64
RELOAD save_firstname
CATCH incorrect_pin flag_incorrect_pin 1
CATCH update_firstname flag_allow_update 1
RELOAD set_back
CATCH _ flag_back_set 1
CATCH pin_entry flag_firstname_set 1
CATCH edit_family_name flag_familyname_set 0
CATCH select_gender flag_gender_set 0
CATCH edit_yob flag_yob_set 0
CATCH edit_location flag_location_set 0
CATCH pin_entry flag_firstname_set 0

View File

@ -1,15 +1,7 @@
CATCH incorrect_pin flag_incorrect_pin 1
CATCH update_location flag_allow_update 1
LOAD get_current_profile_info 0 LOAD get_current_profile_info 0
RELOAD get_current_profile_info RELOAD get_current_profile_info
LOAD save_location 16
MOUT back 0 MOUT back 0
HALT HALT
RELOAD set_back
CATCH _ flag_back_set 1
RELOAD save_location
INCMP _ 0 INCMP _ 0
CATCH pin_entry flag_location_set 1 INCMP edit_location_next *
CATCH edit_offerings flag_offerings_set 0
CATCH pin_entry flag_location_set 0
INCMP edit_offerings *

View File

@ -0,0 +1,8 @@
LOAD save_location 16
RELOAD save_location
CATCH incorrect_pin flag_incorrect_pin 1
CATCH update_location flag_allow_update 1
RELOAD set_back
CATCH _ flag_back_set 1
CATCH pin_entry flag_location_set 1
CATCH edit_offerings flag_offerings_set 0

View File

@ -1,14 +1,7 @@
CATCH incorrect_pin flag_incorrect_pin 1
CATCH update_offerings flag_allow_update 1
LOAD get_current_profile_info 0 LOAD get_current_profile_info 0
RELOAD get_current_profile_info RELOAD get_current_profile_info
LOAD save_offerings 8
MOUT back 0 MOUT back 0
HALT HALT
RELOAD set_back
CATCH _ flag_back_set 1
RELOAD save_offerings
INCMP _ 0 INCMP _ 0
CATCH pin_entry flag_offerings_set 1 INCMP edit_offerings_next *
CATCH pin_entry flag_offerings_set 0
INCMP update_profile_items *

View File

@ -0,0 +1,8 @@
LOAD save_offerings 8
RELOAD save_offerings
CATCH incorrect_pin flag_incorrect_pin 1
CATCH update_offerings flag_allow_update 1
RELOAD set_back
CATCH _ flag_back_set 1
CATCH pin_entry flag_offerings_set 1
MOVE update_profile_items

View File

@ -1,19 +1,7 @@
CATCH incorrect_pin flag_incorrect_pin 1
CATCH update_yob flag_allow_update 1
LOAD get_current_profile_info 0 LOAD get_current_profile_info 0
RELOAD get_current_profile_info RELOAD get_current_profile_info
MAP get_current_profile_info MAP get_current_profile_info
MOUT back 0 MOUT back 0
HALT HALT
RELOAD set_back INCMP _ 0
CATCH _ flag_back_set 1 INCMP edit_yob_next *
LOAD verify_yob 6
RELOAD verify_yob
CATCH incorrect_date_format flag_incorrect_date_format 1
LOAD save_yob 32
RELOAD save_yob
CATCH pin_entry flag_yob_set 1
CATCH edit_location flag_location_set 0
CATCH edit_offerings flag_offerings_set 0
CATCH pin_entry flag_yob_set 0
INCMP edit_location *

View File

@ -0,0 +1,13 @@
LOAD save_yob 16
LOAD verify_yob 8
RELOAD verify_yob
RELOAD save_yob
CATCH incorrect_date_format flag_incorrect_date_format 1
CATCH incorrect_pin flag_incorrect_pin 1
CATCH update_yob flag_allow_update 1
RELOAD set_back
CATCH _ flag_back_set 1
CATCH pin_entry flag_yob_set 1
CATCH edit_location flag_location_set 0
CATCH edit_offerings flag_offerings_set 0
CATCH pin_entry flag_yob_set 0

View File

@ -2,5 +2,5 @@ LOAD reset_incorrect_date_format 8
MOUT retry 1 MOUT retry 1
MOUT quit 9 MOUT quit 9
HALT HALT
INCMP _ 1 INCMP ^ 1
INCMP quit 9 INCMP quit 9

View File

@ -1,5 +1,3 @@
CATCH incorrect_pin flag_incorrect_pin 1
CATCH profile_update_success flag_allow_update 1
LOAD get_current_profile_info 0 LOAD get_current_profile_info 0
RELOAD get_current_profile_info RELOAD get_current_profile_info
MOUT male 1 MOUT male 1

View File

@ -1,10 +1,3 @@
LOAD save_gender 32 LOAD save_gender 16
RELOAD save_gender RELOAD save_gender
CATCH incorrect_pin flag_incorrect_pin 1 MOVE set_gender_next
CATCH update_gender flag_allow_update 1
CATCH pin_entry flag_gender_set 1
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_gender_set 0
MOVE edit_yob

View File

@ -0,0 +1 @@
Select gender

View File

@ -0,0 +1,6 @@
CATCH incorrect_pin flag_incorrect_pin 1
CATCH update_gender flag_allow_update 1
CATCH pin_entry flag_gender_set 1
CATCH edit_yob flag_yob_set 0
CATCH edit_location flag_location_set 0
CATCH edit_offerings flag_offerings_set 0

View File

@ -1,10 +1,3 @@
LOAD save_gender 16 LOAD save_gender 16
RELOAD save_gender RELOAD save_gender
CATCH incorrect_pin flag_incorrect_pin 1 MOVE set_gender_next
CATCH update_gender flag_allow_update 1
CATCH pin_entry flag_gender_set 1
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_gender_set 0
MOVE edit_yob

View File

@ -1,10 +1,3 @@
LOAD save_gender 8 LOAD save_gender 16
RELOAD save_gender RELOAD save_gender
CATCH incorrect_pin flag_incorrect_pin 1 MOVE set_gender_next
CATCH update_gender flag_allow_update 1
CATCH pin_entry flag_gender_set 1
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_gender_set 0
MOVE edit_yob