Commit Graph

431 Commits

Author SHA1 Message Date
4a62773098
add handler fetching custodial balances 2024-10-15 13:44:50 +03:00
be6391686f
update return type 2024-10-14 23:17:57 +03:00
7df77a1343
updated the ValidateAmount to also check the active symbol, updated tests 2024-10-12 20:07:06 +03:00
f5dbfe553d
use the check_balance for the max_amount 2024-10-12 20:06:00 +03:00
7fe8f0b7d5
updated the args under FetchVouchers 2024-10-12 18:03:13 +03:00
a9f9867976
added the TestSetVoucher 2024-10-12 17:36:00 +03:00
b6d24bf929
update the TestCheckBalance 2024-10-12 16:29:12 +03:00
e9684fcf45
check whether the active symbol is empty 2024-10-12 16:28:02 +03:00
a5b1c5b74e
cleaned up the code 2024-10-12 14:32:40 +03:00
672eebb8fb
display the balance based on the symbol 2024-10-11 09:42:08 +03:00
7c08a0f0af
add temp and active balance 2024-10-10 14:48:23 +03:00
9ad7d5a522
set the active symbol 2024-10-09 15:39:06 +03:00
6c904a8b3f
add the temporary and active symbol 2024-10-09 15:38:19 +03:00
9ccb6cc066
use 99 as the quit 2024-10-09 15:05:59 +03:00
2c98a8e133
read token list from json file 2024-10-08 14:34:21 +03:00
4b6fd35e7a
define importable voucher response 2024-10-08 13:43:57 +03:00
b3c7a3a337
Merge remote-tracking branch 'refs/remotes/origin/menu-voucherlist' into menu-voucherlist 2024-10-08 13:43:19 +03:00
7b374ad801
define importable token list 2024-10-08 13:41:09 +03:00
cb4a52e4f2
view a selected voucher and verify the PIN 2024-10-07 16:16:57 +03:00
e4ed9a65bb
store the symbols and balances 2024-10-07 13:49:12 +03:00
755899be4e
store the pre-rendered vouchers list 2024-10-07 08:59:15 +03:00
4dede757d2 Merge branch 'lash/subprefix' into menu-voucherlist 2024-10-07 08:06:37 +03:00
517f980664
get the vouchers list and store in gdbm 2024-10-05 16:56:49 +03:00
31aea6b807
added model and func to fetch vouchers from the API 2024-09-28 14:07:37 +03:00
3a46fda769
use save_temporary_pin and updated tests 2024-09-28 12:26:37 +03:00
c7bdfe90b7 Merge branch 'master' into menu-voucherlist 2024-09-28 11:07:36 +03:00
lash
2a93ea7a0c
Remove out-of-context extend key 2024-09-27 21:16:08 +01:00
lash
f89b1acc6c Merge branch 'master' into lash/subprefix 2024-09-27 21:15:17 +01:00
lash
1dc8b054eb
Add sub-prefix db wrapper 2024-09-27 21:10:03 +01:00
60134f14e9 Merge branch 'master' into menu-voucherlist 2024-09-27 19:11:35 +03:00
a3ff3be5b1
clean up 2024-09-27 16:32:47 +03:00
ea52a7cf0a
update tests 2024-09-26 23:11:37 +03:00
a993026380
update tests 2024-09-26 23:07:48 +03:00
lash
4ee241714b
Attempt 2 revert changes from ssh 2024-09-26 15:08:15 +01:00
0dc322729f Merge pull request 'SSH server entry point.' (#77) from lash/ssh-2 into master
Reviewed-on: #77
2024-09-26 15:55:51 +02:00
221db4e998
return a numbered list of vouchers 2024-09-25 16:06:06 +03:00
188cb573dd
add dummy vouchers list 2024-09-25 13:27:13 +03:00
6dbd250694
remove extra spaces 2024-09-25 09:29:26 +03:00
0dea34daab
resolve confilict 2024-09-24 09:18:21 +03:00
8057313c78
Merge remote-tracking branch 'remotes/origin/master' into menu-profile-edit 2024-09-24 09:10:17 +03:00
bbfe46f162
use current rendering symbol for case selection 2024-09-24 09:01:19 +03:00
eff2cbde8b
setup check for unused code 2024-09-24 09:00:31 +03:00
5c85ecffd1
remove unused code 2024-09-24 09:00:13 +03:00
lash
c18c40b1b8 Merge branch 'lash/thread-gdbm' into lash/ssh-2 2024-09-23 18:56:38 +01:00
lash
6112ca175f Merge branch 'master' into lash/thread-gdbm 2024-09-23 18:54:18 +01:00
4a447fbb45
update profile update 2024-09-23 20:10:37 +03:00
lash
c02d70eaa4
Upgrade dep, improve logging 2024-09-23 17:35:17 +01:00
lash
e4c3e9f015
Add ssh instructions, log host key 2024-09-22 16:09:57 +01:00
lash
9b71244391 Merge branch 'lash/thread-gdbm' into lash/ssh-2 2024-09-22 15:43:18 +01:00
lash
ada1f26b68
Add keystore class, separate keystore tool executable 2024-09-22 15:41:55 +01:00
lash
935b777e57
Factor out ssh service code 2024-09-22 14:41:01 +01:00
lash
7d3ff690f0
Remove useless 'registered' member in thread gdbm 2024-09-22 03:10:58 +01:00
lash
a455cfb854
Return if duplicate connect 2024-09-22 03:09:53 +01:00
lash
28fc7a0462
Implement threaded gdbm in storageservice 2024-09-22 02:28:00 +01:00
lash
78d349ccc7
Add threaded gdbm wrapper 2024-09-22 02:21:56 +01:00
lash
0813a619b4
Add hacky db closer function in ssh 2024-09-21 21:32:02 +01:00
lash
8dcba67fe9
WIP can execute single session, but persister fails in next 2024-09-21 18:49:11 +01:00
lash
5cac17676a
WIP adapt ssh server sketch to urdt setup 2024-09-21 00:32:39 +01:00
63c7c65a00
rename all WriteResult to Flush 2024-09-20 22:15:24 +03:00
a1056cf287
removed unused code 2024-09-20 13:54:23 +03:00
e6e701a609
remove init and use Exec 2024-09-20 13:13:20 +03:00
5c5f4cbc8e Merge branch 'master' into wip-main-refactor 2024-09-19 20:19:06 +02:00
e581a1ad2f
factor out getflag 2024-09-19 21:04:09 +03:00
3fe66466c5
renamed test file and added server.go tests 2024-09-19 18:52:13 +03:00
f6979868e5
added at_session_handler tests 2024-09-19 17:19:09 +03:00
e8be64ae28
added http related mocks 2024-09-19 17:18:14 +03:00
e4d8bfad7b
moved the mocks package 2024-09-19 17:17:28 +03:00
96358959b4
remove unused code 2024-09-19 17:04:08 +03:00
bc9dfe4f65
remove redundant code 2024-09-19 17:01:23 +03:00
5bd51b280e
add storage service for menu 2024-09-19 15:57:11 +03:00
71e1ae6e3c
add function registration service 2024-09-19 15:54:23 +03:00
10de039da0
remove obsolete code 2024-09-18 15:42:56 +03:00
27aa71e0ee
only set the code to 200 if no error exists 2024-09-18 15:11:49 +03:00
a9a429824c
return if the sessionId cannot be retrieved from the request 2024-09-18 14:52:56 +03:00
2982f08b41 Merge branch 'master' into change-language 2024-09-17 18:30:52 +02:00
75ab9c66a3
run TestSetLanguage with execPath instead of input 2024-09-17 18:54:07 +03:00
599f7a2857
add more tests 2024-09-17 15:44:22 +03:00
065c8e5c1d
use a single set_language function for setting and changing language 2024-09-17 15:26:50 +03:00
06e23565df added the SetNewLanguage function 2024-09-16 17:29:27 +03:00
2ed9f083bb add quit with helpline info
add quit with helpline info
2024-09-16 15:17:56 +01:00
a3f410875a
define temporary key value 2024-09-16 14:39:42 +03:00
3f3e98e637
add pin reset handlers 2024-09-16 14:39:01 +03:00
78c033e61c
remove deprecated code 2024-09-14 20:59:08 +03:00
b5ef483f34
clean up tests 2024-09-14 20:07:17 +03:00
e99a788c60
add tests 2024-09-14 20:01:58 +03:00
f4f475bd45 Merge pull request 'africas-talking' (#50) from africas-talking into lash/async-driver
Reviewed-on: #50
Reviewed-by: lash <accounts-grassrootseconomics@holbrook.no>
2024-09-14 16:28:05 +02:00
6fe2e7287f Update the func name to Output
Signed-off-by: Alfred Kamanda <alfredkamandamw@gmail.com>
2024-09-14 16:01:18 +02:00
1e9c9cf6ad
removed AT specific code 2024-09-14 15:57:16 +03:00
3cb0b099e4
use the new AtSessionHandler 2024-09-14 15:55:45 +03:00
b53658e038
have AtOutput as an option 2024-09-13 16:03:31 +03:00
512460fdeb
Added Custom AtOutput to append CON or END to output 2024-09-13 16:02:04 +03:00
762f90adf6
Added Continue bool to track whether the execution should be terminated 2024-09-12 23:52:35 +03:00
lash
9b4a4eeaf4
Temporary solution for make sure storage object gets put back in all cases of execution 2024-09-12 16:46:11 +01:00
lash
b31d3b907a
Add shutdown to async, rehabilitate http cmd 2024-09-12 04:13:57 +01:00
lash
d49f866ca4
Factor out methods common to http and async cli 2024-09-12 04:07:55 +01:00
lash
dde9f552a6
Isolate http specific parts to minimal 2024-09-12 03:30:23 +01:00
lash
514e043e38
Fix symptom of handler missing persister 2024-09-11 17:53:12 +01:00
lash
836e5fe8ee
Revert africas talking changes in http 2024-09-11 17:32:55 +01:00
44015b1c76
Parse the request body to get the PhoneNumber and Input text 2024-09-11 15:40:49 +03:00
lash
681f293d3c
Externalize requestparser, flush persister on http request end 2024-09-10 23:09:10 +01:00
lash
8e3ff27bb8
Ensure db close on http signal shutdown, correct stores to provider 2024-09-10 20:44:10 +01:00
lash
dd2468a4d7 Http server harness
Add storage retrieval solution for http handler

Successfully executed account regisration using http

Set upstream go-vise dependency version in go.mod

Adapt menuhandler to upstream
2024-09-10 13:59:36 +01:00
ad48890a9f
remove deprecated code 2024-09-10 11:24:09 +03:00
c0a3ad7e2b
delete deprecated code 2024-09-10 11:23:41 +03:00
a3dffdf4e9
match code refactor 2024-09-10 11:23:25 +03:00
47d39a1c6f
remove commented test 2024-09-09 17:24:43 +03:00
f5f1cbaaba
cleanup 2024-09-09 17:18:07 +03:00
134aa96194
implement db for user datastore 2024-09-09 17:16:08 +03:00
0cdb23fbea
setupmock for user datastore 2024-09-09 17:15:35 +03:00
ca655b0cdc
add tests 2024-09-09 17:15:04 +03:00
deb4706b1d
Test commit 2024-09-07 17:51:30 +03:00
e14fd5e496
Return the response and the error 2024-09-07 17:41:05 +03:00
01c13ec581
make packKey accessible from tests 2024-09-07 16:25:29 +03:00
dd97531861
remove uimplemented tests 2024-09-07 16:24:37 +03:00
be33b7458f
cleanup code 2024-09-07 16:22:08 +03:00
4c3f63a48f
create an account only if not found in gdbm 2024-09-07 10:36:00 +03:00
d1d5c897d1
refactor 2024-09-07 09:55:59 +03:00
04ea11dd6d
setup db mock 2024-09-07 09:55:47 +03:00
5722552395
remove old mocks 2024-09-07 09:55:13 +03:00
421fbe5543
setup mock for the acccount service 2024-09-07 09:55:00 +03:00
de24ca0648
Mock the gdm nd updated the TestSaveFirstname and TestSaveFamilyname 2024-09-07 09:30:20 +03:00
175cbd1983
setup template test 2024-09-06 17:51:07 +03:00
8175d6ac12
setup db mock 2024-09-06 17:50:33 +03:00
eb9f470ac5
Update the GetProfileInfo to get data from gdbm 2024-09-06 16:17:26 +03:00
7a12588744
remove deprecated code 2024-09-06 12:42:24 +03:00
2cc85379cc
update log 2024-09-06 11:02:33 +03:00
d001c5a7fc
Write and read data from gdbm 2024-09-06 09:33:39 +03:00
de8c7ce34a
Added user data to db.go util 2024-09-06 08:35:01 +03:00
lash
cad8e86c8b
Remove manual init calls in handler funcs 2024-09-05 23:55:54 +01:00
lash
0feb013c78
Ensure handler init when state and cache is available 2024-09-05 20:40:40 +01:00
643b4d87a9
read account pin of gdbm store 2024-09-05 20:30:28 +03:00
17804e7641
Save the actual PIN and verify it 2024-09-05 19:50:02 +03:00
lash
db3ec1991d
Remove obsolete store and persister global 2024-09-05 16:45:35 +01:00
lash
62b7adb967
Fix missing byte allocation for typ serialize 2024-09-05 15:41:27 +01:00
lash
6fa5f49bc0
Remove impossible nil check in handler 2024-09-05 15:28:53 +01:00
2bf7a5c246
setup db keys 2024-09-05 17:12:38 +03:00
98c74dffc4
use state from persister 2024-09-05 17:09:30 +03:00
771a1e8169
code refactoring 2024-09-05 17:07:20 +03:00
220c5b2081
remove commented code 2024-09-04 20:22:25 +03:00
8ffc5d67cc
Removed mutex 2024-09-04 12:01:51 +03:00
2d7b6bd125
Removed unused code 2024-09-03 22:28:48 +03:00
5105e902f1
Process flags once and make them available across functions 2024-09-03 19:06:37 +03:00
19b2fa65fa
Merge remote-tracking branch 'refs/remotes/origin/wip-flag-migration' into wip-flag-migration 2024-09-03 18:00:06 +03:00
ee4db50e00
remove unused code 2024-09-03 17:59:03 +03:00
99d18322b2
Append to the correct flag set/reset 2024-09-03 15:34:19 +03:00
a07a8703f4
remove flag setting invalid pin entry 2024-09-03 15:13:55 +03:00
94f12edeaf
Merge remote-tracking branch 'refs/remotes/origin/wip-flag-migration' into wip-flag-migration 2024-09-03 15:08:45 +03:00
fee51edade
append sessionid to the gdbm file 2024-09-03 15:07:49 +03:00
ab6433168a
Resolve bug on transaction confirmation PIN 2024-09-03 15:02:31 +03:00
0c360c0cc4
remove panics after failed execution 2024-09-03 13:19:32 +03:00
c365eaa1d1
remove unused code 2024-09-02 21:24:16 +03:00
337419c9f2
Merge remote-tracking branch 'refs/remotes/origin/wip-flag-migration' into wip-flag-migration 2024-09-02 21:10:41 +03:00
d4c4db09f3
load profile data from gdbm 2024-09-02 21:09:39 +03:00
3a3ddc9922
Use FlagParser on main.go and delete the flags.go file 2024-09-02 21:06:42 +03:00
1c1ea74088
Merge remote-tracking branch 'refs/remotes/origin/wip-flag-migration' into wip-flag-migration 2024-09-02 17:12:01 +03:00
14c8230fd4
code cleanup 2024-09-02 17:11:08 +03:00
b6e4ba7ede
Verify PIN using the one in the db 2024-09-02 17:08:57 +03:00
2b511aba4c
remove commented code 2024-09-02 16:39:04 +03:00
626fca1a55
Merge remote-tracking branch 'refs/remotes/origin/wip-flag-migration' into wip-flag-migration 2024-09-02 16:30:58 +03:00
fe4df78f80
use gdbm for user info storage 2024-09-02 16:04:53 +03:00
31be1fa221
Use flags from pp.csv on the menuhandler functions and tests 2024-09-02 14:00:02 +03:00
ba4d0abcda
improve doc line 2024-09-02 10:03:57 +03:00
632dd860ff
Use flags from pp.csv on the Authorize function 2024-08-31 17:16:57 +03:00
c71f6e76d7
Merge remote-tracking branch 'refs/remotes/origin/wip-flag-migration' into wip-flag-migration 2024-08-31 14:56:18 +03:00
2559b4e604
add test profile 2024-08-31 14:55:54 +03:00
c3c5c83662
Change the order of flags 2024-08-31 14:48:02 +03:00
de4aaeb02b
use script dir for parser 2024-08-31 10:26:49 +03:00
cc323707fc
setup parser 2024-08-31 10:21:20 +03:00
33178e9482
Merge remote-tracking branch 'refs/remotes/origin/wip-account-creation' into wip-account-creation 2024-08-30 14:03:30 +03:00
1dbd3c0b8e
add more test cases 2024-08-30 14:01:58 +03:00
2c6f70dfa5
Add tests for GetSender and GetAmount 2024-08-30 13:52:25 +03:00
9ec23d395c
add test case for saving location 2024-08-30 11:18:16 +03:00
c1389b4ab3
add test case for saving location 2024-08-30 11:17:06 +03:00
76185c3aa1
Use AccountService in the TestCreateAccount 2024-08-30 10:45:04 +03:00
1ded359b59
refactor 2024-08-30 09:17:09 +03:00
00d582c017
setup account file interface 2024-08-30 09:15:38 +03:00
23bfdf4483
add documentation lines 2024-08-30 09:15:04 +03:00
241fe9e5fe
remove repeated code 2024-08-30 09:14:17 +03:00
dd0b0ce5a3
use authorize flag instead of unlock 2024-08-29 23:22:27 +03:00
54d777de04
Merge remote-tracking branch 'refs/remotes/origin/wip-account-creation' into wip-account-creation 2024-08-29 23:17:56 +03:00
23680846b4
rename unlock flags 2024-08-29 23:15:58 +03:00
09c3c012da
rename flags 2024-08-29 23:14:36 +03:00
ca86ef1507
Use gettext for the Quit function 2024-08-29 23:05:41 +03:00
75ca39b012
Define the regex pattern as a constant 2024-08-29 22:57:19 +03:00
1a7c992e5b
Return without setting the flag that's already set 2024-08-29 22:54:52 +03:00
3da2949d38
use fake fields for the response 2024-08-29 20:17:38 +03:00
64e182fd44
use interfaces for handlers 2024-08-29 20:08:36 +03:00
22d076ea50
setup test for successful account creation 2024-08-29 20:07:50 +03:00
edcbf9979d
Merge remote-tracking branch 'refs/remotes/origin/wip-account-creation' into wip-account-creation 2024-08-29 20:00:50 +03:00
20cf7bdb44
setup interface for file operations 2024-08-29 19:56:50 +03:00
08fcb7cdba
use interfaces for the handler 2024-08-29 19:56:25 +03:00
7b5d82c7bf
setup service for handling account activities 2024-08-29 19:55:08 +03:00
a64291bb31
setup test for successful account creation 2024-08-29 19:54:26 +03:00
195f003d69
create mocks 2024-08-29 19:53:55 +03:00
802c3f92df
Added tests for CreateAccount and SavePin 2024-08-29 19:24:43 +03:00
b344720fdc
add documentation lines 2024-08-28 21:01:25 +03:00
3fdd702e93
Use getText for the language switch 2024-08-28 18:26:41 +03:00
7cb94742e1
Merge remote-tracking branch 'refs/remotes/origin/wip-account-creation' into wip-account-creation 2024-08-28 18:15:14 +03:00
16f00bcf09
use getText for external functions translation 2024-08-28 18:13:49 +03:00
9f0ef13198
Added documentation lines on functions 2024-08-28 16:23:52 +03:00
768535b540
Quit with the transaction confirmation 2024-08-28 14:54:39 +03:00
3501a79aea
Merge remote-tracking branch 'refs/remotes/origin/wip-account-creation' into wip-account-creation 2024-08-28 14:19:08 +03:00
54bc09b7e9
initialize testing for menu handlers 2024-08-28 14:14:28 +03:00
7b33f2f644
Initiate a transaction once a valid PIN is provided 2024-08-28 14:11:20 +03:00
d87b70b292
reset unlock for update 2024-08-28 12:19:38 +03:00
0eb1115e39
add handler for setting and resetting single edits 2024-08-28 10:10:49 +03:00
c565a9dde5
add flag to handle single field profile edit 2024-08-28 10:09:49 +03:00
b48760760b
Validate that the PIN is 4 digits 2024-08-28 00:17:45 +03:00
633d56b0ad
Allow users to include 'CELO' in the amount 2024-08-27 16:16:15 +03:00
2b10f6023f
Use the balance as the max_amount 2024-08-27 16:10:43 +03:00
8d9aaeedbc
Validate that the amount is not greater than the balance 2024-08-27 16:02:24 +03:00
1d578209fc
Ensure that the user sets a PIN before proceeding to main 2024-08-27 15:41:53 +03:00
2a5f7517f4
add function to calculate age with yob 2024-08-27 14:59:17 +03:00
674fd5773a
validate date as a 4 digit input value 2024-08-27 14:57:26 +03:00
bf99ed8482
Added a CATCH if the account creation fails 2024-08-27 13:38:08 +03:00
7e95e7cbb3
initialize fieldnames 2024-08-27 13:30:00 +03:00
ded37ab515
Merge remote-tracking branch 'refs/remotes/origin/wip-account-creation' into wip-account-creation 2024-08-27 11:24:34 +03:00
ddde2fb4ca
add documentation lines 2024-08-27 11:22:37 +03:00
9f1eed9ab3
Add an account util for reading and writing data to file 2024-08-27 11:19:49 +03:00
1a0173eee5
add documentation lines 2024-08-27 10:20:38 +03:00
0aacc06146
add documentation code 2024-08-27 10:18:33 +03:00
5f3baa86ae
remove commented code 2024-08-27 10:16:25 +03:00
db96f0e2e4
add documentation lines 2024-08-27 10:15:11 +03:00
cb31616a87
check for 4 digits input 2024-08-26 21:58:21 +03:00
1a997e8b26
updated the file structure to have external functions on a different package 2024-08-26 15:53:07 +03:00
68dc77d5eb
added flags model 2024-08-26 14:34:38 +03:00
90f6d26f6d
add function to calculate age 2024-08-26 13:37:54 +03:00
36d3f05a31
move api calls in main to handlers package 2024-08-26 13:32:12 +03:00
430c5d32c8
define api calls response 2024-08-26 13:31:20 +03:00
ee649dc79e
setup models for handling api responses 2024-08-26 12:10:39 +03:00
30504b81e2
setup structure for handling api calls 2024-08-26 12:10:16 +03:00