From c3c5c836629c0006045581a92e85ef4ec063c6aa Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Sat, 31 Aug 2024 14:48:02 +0300 Subject: [PATCH 1/2] Change the order of flags --- internal/models/flags.go | 12 ++++++------ services/registration/pp.csv | 28 ++++++++++++++-------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/internal/models/flags.go b/internal/models/flags.go index ba6d617..b64222c 100644 --- a/internal/models/flags.go +++ b/internal/models/flags.go @@ -5,18 +5,18 @@ import "git.defalsify.org/vise.git/state" const ( USERFLAG_LANGUAGE_SET = iota + state.FLAG_USERSTART USERFLAG_ACCOUNT_CREATED + USERFLAG_ACCOUNT_CREATION_FAILED USERFLAG_ACCOUNT_PENDING USERFLAG_ACCOUNT_SUCCESS + USERFLAG_PINMISMATCH + USERFLAG_PIN_SET USERFLAG_ACCOUNT_AUTHORIZED USERFLAG_INVALID_RECIPIENT USERFLAG_INVALID_RECIPIENT_WITH_INVITE - USERFLAG_INCORRECTPIN - USERFLAG_ALLOW_UPDATE USERFLAG_INVALID_AMOUNT - USERFLAG_PIN_SET + USERFLAG_INCORRECTPIN USERFLAG_VALIDPIN - USERFLAG_PINMISMATCH - USERFLAG_INCORRECTDATEFORMAT - USERFLAG_ACCOUNT_CREATION_FAILED + USERFLAG_ALLOW_UPDATE USERFLAG_SINGLE_EDIT + USERFLAG_INCORRECTDATEFORMAT ) diff --git a/services/registration/pp.csv b/services/registration/pp.csv index 0501c1a..fd552e4 100644 --- a/services/registration/pp.csv +++ b/services/registration/pp.csv @@ -1,16 +1,16 @@ flag,flag_language_set,8,checks whether the user has set their prefered language flag,flag_account_created,9,this is set when an account has been created on the API -flag,flag_account_pending,10,this is set when an account does not have a status of SUCCESS -flag,flag_account_success,11,this is set when an account has a status of SUCCESS -flag,flag_account_authorized,12,this is set to allow a user access guarded nodes after providing a correct PIN -flag,flag_invalid_recipient,13,this is set when the transaction recipient is invalid -flag,flag_invalid_recipient_with_invite,14,this is set when the transaction recipient is valid but not on the platform -flag,flag_incorrect_pin,15,this is set when the provided PIN is invalid or does not match the current account's PIN -flag,flag_allow_update,16,this is set to allow a user to update their profile data -flag,flag_invalid_amount,17,this is set when the given transaction amount is invalid -flag,flag_pin_set,18,this is set when a newly registered user sets a PIN. This must be present for an account to access the main menu -flag,flag_valid_pin,19,this is set when the given PIN is valid -flag,flag_pin_mismatch,20,this is set when the confirmation PIN matches the initial PIN during registration -flag,flag_incorrect_date_format,21,this is set when the given year of birth is invalid -flag,flag_account_creation_failed,22,this is set when there's an error from the API during account creation -flag,flag_single_edit,23,this is set to allow a user to edit a single profile item such as year of birth +flag,flag_account_creation_failed,10,this is set when there's an error from the API during account creation +flag,flag_account_pending,11,this is set when an account does not have a status of SUCCESS +flag,flag_account_success,12,this is set when an account has a status of SUCCESS +flag,flag_pin_mismatch,13,this is set when the confirmation PIN matches the initial PIN during registration +flag,flag_pin_set,14,this is set when a newly registered user sets a PIN. This must be present for an account to access the main menu +flag,flag_account_authorized,15,this is set to allow a user access guarded nodes after providing a correct PIN +flag,flag_invalid_recipient,16,this is set when the transaction recipient is invalid +flag,flag_invalid_recipient_with_invite,17,this is set when the transaction recipient is valid but not on the platform +flag,flag_invalid_amount,18,this is set when the given transaction amount is invalid +flag,flag_incorrect_pin,19,this is set when the provided PIN is invalid or does not match the current account's PIN +flag,flag_valid_pin,20,this is set when the given PIN is valid +flag,flag_allow_update,21,this is set to allow a user to update their profile data +flag,flag_single_edit,22,this is set to allow a user to edit a single profile item such as year of birth +flag,flag_incorrect_date_format,23,this is set when the given year of birth is invalid From 460e6fa2c8b46519393f3713ea4fe0aa85faad82 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Sat, 31 Aug 2024 14:50:45 +0300 Subject: [PATCH 2/2] Renamed duplicate flag --- cmd/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/main.go b/cmd/main.go index 39136a9..26ad520 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -48,7 +48,7 @@ func main() { state.FlagDebugger.Register(models.USERFLAG_INVALID_AMOUNT, "INVALIDAMOUNT") state.FlagDebugger.Register(models.USERFLAG_ALLOW_UPDATE, "UNLOCKFORUPDATE") state.FlagDebugger.Register(models.USERFLAG_VALIDPIN, "VALIDPIN") - state.FlagDebugger.Register(models.USERFLAG_VALIDPIN, "ACCOUNTUNLOCKED") + state.FlagDebugger.Register(models.USERFLAG_ACCOUNT_AUTHORIZED, "ACCOUNT_AUTHORIZED") state.FlagDebugger.Register(models.USERFLAG_ACCOUNT_CREATION_FAILED, "ACCOUNT_CREATION_FAILED") state.FlagDebugger.Register(models.USERFLAG_SINGLE_EDIT, "SINGLEEDIT")