From a6301163eb96e439fa8a993f072fc913e527112e Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Mon, 23 Sep 2024 09:59:21 +0300 Subject: [PATCH 1/5] use latest commit from go-vise 0.2.0 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 7cceaa6..aabd27b 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module git.grassecon.net/urdt/ussd go 1.22.6 require ( - git.defalsify.org/vise.git v0.1.0-rc.3.0.20240920144308-b2d2c5f18f38 + git.defalsify.org/vise.git v0.1.0-rc.3.0.20240920215822-39b8e4e6b7a6 github.com/alecthomas/assert/v2 v2.2.2 github.com/peteole/testdata-loader v0.3.0 gopkg.in/leonelquinteros/gotext.v1 v1.3.1 diff --git a/go.sum b/go.sum index 5d235cc..a915f5f 100644 --- a/go.sum +++ b/go.sum @@ -4,6 +4,8 @@ git.defalsify.org/vise.git v0.1.0-rc.3.0.20240914163514-577f56f43bea h1:6ZYT+dIj git.defalsify.org/vise.git v0.1.0-rc.3.0.20240914163514-577f56f43bea/go.mod h1:JDguWmcoWBdsnpw7PUjVZAEpdC/ubBmjdUBy3tjP63M= git.defalsify.org/vise.git v0.1.0-rc.3.0.20240920144308-b2d2c5f18f38 h1:4aAZijIcq33ixnZ+U48ckDIkwSfZL3St/CqoXZcC5K8= git.defalsify.org/vise.git v0.1.0-rc.3.0.20240920144308-b2d2c5f18f38/go.mod h1:JDguWmcoWBdsnpw7PUjVZAEpdC/ubBmjdUBy3tjP63M= +git.defalsify.org/vise.git v0.1.0-rc.3.0.20240920215822-39b8e4e6b7a6 h1:vPql8/Ra1P2eRSh52GIj85v6uxbSiKrZaXv5bp4VNgQ= +git.defalsify.org/vise.git v0.1.0-rc.3.0.20240920215822-39b8e4e6b7a6/go.mod h1:JDguWmcoWBdsnpw7PUjVZAEpdC/ubBmjdUBy3tjP63M= 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/participle/v2 v2.0.0 h1:Fgrq+MbuSsJwIkw3fEj9h75vDP0Er5JzepJ0/HNHv0g= From f215159725b7878e333565420e6c9521518d24fb Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Mon, 23 Sep 2024 11:38:07 +0300 Subject: [PATCH 2/5] change position of LOAD --- services/registration/transaction_pin.vis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/registration/transaction_pin.vis b/services/registration/transaction_pin.vis index cadbdcf..a0941ed 100644 --- a/services/registration/transaction_pin.vis +++ b/services/registration/transaction_pin.vis @@ -5,8 +5,8 @@ RELOAD get_sender MAP get_sender MOUT back 0 MOUT quit 9 -HALT LOAD authorize_account 6 +HALT RELOAD authorize_account CATCH incorrect_pin flag_incorrect_pin 1 INCMP _ 0 From 66cf90f0442803ed45161cff45f2fee3c35f50bc Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Mon, 23 Sep 2024 14:13:26 +0300 Subject: [PATCH 3/5] LOAD and RELOAD get_amount --- services/registration/transaction_initiated.vis | 2 +- services/registration/transaction_pin | 2 +- services/registration/transaction_pin.vis | 3 ++- services/registration/transaction_pin_swa | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/services/registration/transaction_initiated.vis b/services/registration/transaction_initiated.vis index 3b8b9f6..f8cf19c 100644 --- a/services/registration/transaction_initiated.vis +++ b/services/registration/transaction_initiated.vis @@ -1,7 +1,7 @@ LOAD reset_incorrect 6 CATCH incorrect_pin flag_incorrect_pin 1 CATCH _ flag_account_authorized 0 -LOAD get_amount 10 +RELOAD get_amount MAP get_amount RELOAD get_recipient MAP get_recipient diff --git a/services/registration/transaction_pin b/services/registration/transaction_pin index 7b6bddb..a1b7125 100644 --- a/services/registration/transaction_pin +++ b/services/registration/transaction_pin @@ -1,2 +1,2 @@ -{{.get_recipient}} will receive {{.validate_amount}} from {{.get_sender}} +{{.get_recipient}} will receive {{.get_amount}} from {{.get_sender}} Please enter your PIN to confirm: \ No newline at end of file diff --git a/services/registration/transaction_pin.vis b/services/registration/transaction_pin.vis index a0941ed..0388f0c 100644 --- a/services/registration/transaction_pin.vis +++ b/services/registration/transaction_pin.vis @@ -1,4 +1,5 @@ -MAP validate_amount +RELOAD get_amount +MAP get_amount RELOAD get_recipient MAP get_recipient RELOAD get_sender diff --git a/services/registration/transaction_pin_swa b/services/registration/transaction_pin_swa index 8529f0e..1924166 100644 --- a/services/registration/transaction_pin_swa +++ b/services/registration/transaction_pin_swa @@ -1,2 +1,2 @@ -{{.get_recipient}} atapokea {{.validate_amount}} kutoka kwa {{.get_sender}} +{{.get_recipient}} atapokea {{.get_amount}} kutoka kwa {{.get_sender}} Tafadhali weka PIN yako kudhibitisha: \ No newline at end of file From 909d1f3409aba6e645b310db709998afc76b02ca Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Mon, 23 Sep 2024 14:16:01 +0300 Subject: [PATCH 4/5] change position of LOAD function --- services/registration/amount.vis | 1 + services/registration/change_language.vis | 1 - services/registration/main.vis | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/services/registration/amount.vis b/services/registration/amount.vis index 9b2970a..b491fab 100644 --- a/services/registration/amount.vis +++ b/services/registration/amount.vis @@ -9,4 +9,5 @@ CATCH invalid_amount flag_invalid_amount 1 INCMP _ 0 LOAD get_recipient 12 LOAD get_sender 64 +LOAD get_amount 12 INCMP transaction_pin * diff --git a/services/registration/change_language.vis b/services/registration/change_language.vis index 05ca95b..b33acf1 100644 --- a/services/registration/change_language.vis +++ b/services/registration/change_language.vis @@ -1,4 +1,3 @@ -LOAD reset_account_authorized 0 LOAD reset_incorrect 0 CATCH incorrect_pin flag_incorrect_pin 1 CATCH pin_entry flag_account_authorized 0 diff --git a/services/registration/main.vis b/services/registration/main.vis index d883dca..4e27a79 100644 --- a/services/registration/main.vis +++ b/services/registration/main.vis @@ -1,3 +1,4 @@ +LOAD reset_account_authorized 0 LOAD check_balance 64 RELOAD check_balance MAP check_balance From 8a03b05c904f87a674be3daf4ae7953700d5f5dc Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Mon, 23 Sep 2024 21:20:57 +0300 Subject: [PATCH 5/5] reset the positon of LOAD function --- services/registration/change_language.vis | 1 + services/registration/main.vis | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/services/registration/change_language.vis b/services/registration/change_language.vis index b33acf1..05ca95b 100644 --- a/services/registration/change_language.vis +++ b/services/registration/change_language.vis @@ -1,3 +1,4 @@ +LOAD reset_account_authorized 0 LOAD reset_incorrect 0 CATCH incorrect_pin flag_incorrect_pin 1 CATCH pin_entry flag_account_authorized 0 diff --git a/services/registration/main.vis b/services/registration/main.vis index 4e27a79..d883dca 100644 --- a/services/registration/main.vis +++ b/services/registration/main.vis @@ -1,4 +1,3 @@ -LOAD reset_account_authorized 0 LOAD check_balance 64 RELOAD check_balance MAP check_balance