wip-account-creation #4

Merged
lash merged 143 commits from wip-account-creation into master 2024-08-30 14:37:58 +02:00
7 changed files with 10 additions and 4 deletions
Showing only changes of commit bf99ed8482 - Show all commits

View File

@ -33,7 +33,7 @@ func main() {
fmt.Fprintf(os.Stderr, "starting session at symbol '%s' using resource dir: %s\n", root, dir) fmt.Fprintf(os.Stderr, "starting session at symbol '%s' using resource dir: %s\n", root, dir)
ctx := context.Background() ctx := context.Background()
st := state.NewState(14) st := state.NewState(15)
st.UseDebug() st.UseDebug()
Alfred-mk marked this conversation as resolved Outdated
Outdated
Review

please rename this flag to USERFLAG_PINMISMATCH to avoid ambiguity.

please rename this flag to USERFLAG_PINMISMATCH to avoid ambiguity.
Outdated
Review

priority

**priority**
state.FlagDebugger.Register(models.USERFLAG_LANGUAGE_SET, "LANGUAGE_CHANGE") state.FlagDebugger.Register(models.USERFLAG_LANGUAGE_SET, "LANGUAGE_CHANGE")
state.FlagDebugger.Register(models.USERFLAG_ACCOUNT_CREATED, "ACCOUNT_CREATED") state.FlagDebugger.Register(models.USERFLAG_ACCOUNT_CREATED, "ACCOUNT_CREATED")
@ -49,8 +49,7 @@ func main() {
state.FlagDebugger.Register(models.USERFLAG_UNLOCKFORUPDATE,"UNLOCKFORUPDATE") state.FlagDebugger.Register(models.USERFLAG_UNLOCKFORUPDATE,"UNLOCKFORUPDATE")
state.FlagDebugger.Register(models.USERFLAG_VALIDPIN,"VALIDPIN") state.FlagDebugger.Register(models.USERFLAG_VALIDPIN,"VALIDPIN")
state.FlagDebugger.Register(models.USERFLAG_VALIDPIN,"ACCOUNTUNLOCKED") state.FlagDebugger.Register(models.USERFLAG_VALIDPIN,"ACCOUNTUNLOCKED")
state.FlagDebugger.Register(models.USERFLAG_ACCOUNT_CREATION_FAILED,"ACCOUNT_CREATION_FAILED")
rfs := resource.NewFsResource(scriptDir) rfs := resource.NewFsResource(scriptDir)
ca := cache.NewCache() ca := cache.NewCache()

View File

@ -64,7 +64,7 @@ func (h *Handlers) CreateAccount(ctx context.Context, sym string, input []byte)
accountResp, err := server.CreateAccount() accountResp, err := server.CreateAccount()
if err != nil { if err != nil {
fmt.Println("Failed to create account:", err) res.FlagSet = append(res.FlagSet, models.USERFLAG_ACCOUNT_CREATION_FAILED)
return res, err return res, err
} }

View File

@ -17,4 +17,5 @@ const (
USERFLAG_VALIDPIN USERFLAG_VALIDPIN
USERFLAG_PINMISMATCH USERFLAG_PINMISMATCH
USERFLAG_INCORRECTDATEFORMAT USERFLAG_INCORRECTDATEFORMAT
USERFLAG_ACCOUNT_CREATION_FAILED
) )

View File

@ -0,0 +1 @@
Your account creation request failed. Please try again later.

View File

@ -0,0 +1,3 @@
MOUT quit 9
HALT
INCMP quit 9

View File

@ -0,0 +1 @@
Ombi lako la kusajiliwa haliwezi kukamilishwa. Tafadhali jaribu tena baadaye.

View File

@ -1,4 +1,5 @@
LOAD create_account 0 LOAD create_account 0
CATCH account_creation_failed 22 1
Alfred-mk marked this conversation as resolved Outdated
Outdated
Review

This is not caught

This is not caught
Outdated
Review

priority

**priority**
MOUT exit 0 MOUT exit 0
HALT HALT
LOAD save_pin 0 LOAD save_pin 0