debt-menu #115

Merged
Alfred-mk merged 131 commits from debt-menu into master 2026-02-25 09:44:58 +01:00
131 Commits
Author SHA1 Message Date
alfred-mk c16c39f289 update the translations for the swahili menus 2026-02-25 11:37:36 +03:00
alfred-mk 185ff0dc45 have a single view for the pay_debt node 2026-02-25 11:35:58 +03:00
alfred-mk 45ccefe1fe properly format the comments 2026-02-25 10:16:29 +03:00
alfred-mk eea51ea40d reset appropriate error flags on success
release / docker (push) Has been cancelled
2026-02-23 17:46:52 +03:00
alfred-mk 43c4b64b42 correctly calculate the credit
release / docker (push) Has been cancelled
2026-02-23 16:20:36 +03:00
alfred-mk 686f119a9e remove unused CATCH statement 2026-02-23 16:16:15 +03:00
alfred-mk 759e424805 use the correct sym for proper error handling 2026-02-23 16:15:59 +03:00
alfred-mk a270079008 add a fix for when users input a value when no vouchers exist 2026-02-23 16:15:12 +03:00
alfred-mk 62eb132b32 add a translation for the pay debt menu 2026-02-23 16:14:31 +03:00
alfred-mk f198ecd913 have different syms to customize the final output when one has a single voucher 2026-02-23 16:11:19 +03:00
alfred-mk 6e426bf6a0 return a default credit and debt response when one doesn't have a voucher 2026-02-23 11:05:43 +03:00
alfred-mk 3bfa9820dd remove debug statements
release / docker (push) Has been cancelled
2026-02-20 13:35:28 +03:00
alfred-mk a2e2c0d68e ensure the number is valid 2026-02-20 13:33:43 +03:00
alfred-mk e5b9a8955d include the retrieved phone number 2026-02-20 13:30:21 +03:00
alfred-mk 301d4f4232 add debug statements 2026-02-20 13:28:29 +03:00
alfred-mk 9e93bb4b59 revert to a normal transaction of the recipient phone number is not present 2026-02-20 13:25:39 +03:00
alfred-mk 6553c5a773 added error logs and read data keys directly 2026-02-20 13:16:23 +03:00
alfred-mk f948f7f27e remove the amount multiplication by 1.015
release / docker (push) Has been cancelled
2026-02-20 09:54:21 +03:00
alfred-mk 9646cc2955 add a CATCH when one cannot swap from the current pool 2026-02-20 09:48:10 +03:00
alfred-mk bfef77e20e add a CATCH for low amounts and API errors 2026-02-20 09:41:03 +03:00
alfred-mk 3108cb2f22 set a default content of 0 if rates are not found for the selected voucher 2026-02-20 09:34:58 +03:00
alfred-mk 320d10890c improve the error message when one has a low swap amount 2026-02-19 20:09:24 +03:00
alfred-mk 3595ff0d61 include the active symbol in the displayed limit 2026-02-19 20:08:57 +03:00
alfred-mk 29cc4c63eb correctly CATCH error flags 2026-02-19 20:02:44 +03:00
alfred-mk 0280211197 set a default value of 0 on an API error 2026-02-19 20:01:58 +03:00
alfred-mk 2e48fbad00 update the vis files to CATCH the low amount flag 2026-02-19 19:51:50 +03:00
alfred-mk cdd83dfd73 update the credit and debt calculations 2026-02-19 19:36:23 +03:00
alfred-mk 0ef706a47e include the word pool and update the translation
release / docker (push) Has been cancelled
2026-02-19 09:15:09 +03:00
alfred-mk dec8fbc3f0 use the pool symbol in place of the pool name 2026-02-19 09:04:52 +03:00
alfred-mk 29863d385d remove unused OutputAmount 2026-02-19 08:43:03 +03:00
alfred-mk da8c8c711f Merge branch 'master' into debt-menu 2026-02-19 08:40:51 +03:00
alfred-mk 3ebb4611ca use the correct data keys for the credit send
release / docker (push) Has been cancelled
2026-02-18 18:07:49 +03:00
alfred-mk 6bc9247acb updated the data keys on the test to match the retrieved data 2026-02-18 17:08:11 +03:00
alfred-mk f6c613abd6 rename the func to match updated functionality 2026-02-18 17:07:38 +03:00
alfred-mk 4660527e66 updated the send logic to work with a custom voucher 2026-02-18 16:59:37 +03:00
alfred-mk 75caed5f08 added a key to store the actual transaction voucher 2026-02-18 16:58:28 +03:00
alfred-mk 5650629ae4 update the db key name for clarity 2026-02-18 16:56:40 +03:00
alfred-mk d2b4dcef36 match the updated function name in the test 2026-02-18 16:09:20 +03:00
alfred-mk 8d259683a1 fetch the DATA_RECIPIENT_INPUT instead of temporary value 2026-02-18 16:08:47 +03:00
alfred-mk 836ea3ce9d simplified the vis files by removing unused LOAD and RELOAD statements 2026-02-18 16:08:14 +03:00
alfred-mk e03ca7fcae use the normal transaction preview and the translation 2026-02-18 16:06:40 +03:00
alfred-mk 81b56f6fed added a key to store the initial recipient input given by the user 2026-02-18 16:04:40 +03:00
alfred-mk f869ff437e update the transaction for custom voucher selection 2026-02-17 16:10:31 +03:00
alfred-mk d8a6535c6f added validation and storage of the selected custom voucher 2026-02-17 16:09:14 +03:00
alfred-mk 108d5bdc3e added a node for credit voucher selection 2026-02-17 16:08:22 +03:00
alfred-mk 2d6e7e81dd added a db key to store the state of the custom transaction voucher 2026-02-17 16:07:34 +03:00
alfred-mk 96ba48bcba only set the flag if the user has a single voucher 2026-02-17 14:04:17 +03:00
alfred-mk a346adb8f9 display the default asset during the Mpesa topup 2026-02-17 13:36:38 +03:00
alfred-mk c50c53c758 use the current balance as debt
release / docker (push) Has been cancelled
2026-02-17 08:51:22 +03:00
alfred-mk e7a3e63cd5 go back on 0 input for navigation 2026-02-17 08:42:58 +03:00
alfred-mk fe534b1181 polished the withdraw mpesa flow to correctly work with the selected voucher
release / docker (push) Has been cancelled
2026-02-16 14:28:30 +03:00
alfred-mk a78639799d add a function for ReadSwapToVoucher 2026-02-16 14:14:50 +03:00
alfred-mk 09954d967f read the data entries directly from the store
release / docker (push) Has been cancelled
2026-02-16 10:21:20 +03:00
alfred-mk 465b3b5604 use the default stable decimals to scale down the quote 2026-02-16 10:20:10 +03:00
alfred-mk aacea81397 added the default stable voucher address and decimals 2026-02-16 10:14:41 +03:00
Alfred Kamanda c2cfd0fe44 updated the credit and debt calculations 2026-02-16 09:08:13 +03:00
Alfred Kamanda f6ecbcc79d remove lowercase conversion of voucher addresses 2026-02-16 09:06:53 +03:00
Alfred Kamanda 43b963995f refactored the code to send the correct pool deposit request 2026-02-13 16:36:20 +03:00
Alfred Kamanda 2e81ae58bc refactored the code for proper debt removal confirmation 2026-02-13 16:07:46 +03:00
Alfred Kamanda 8f66a46e76 added a function to ReadSwapFromVoucher 2026-02-13 16:04:00 +03:00
Alfred Kamanda 47a14555fb reordered vis statements to match updated menu flow 2026-02-13 14:50:39 +03:00
Alfred Kamanda 5c1b4ab002 refactored the CalculateMaxPayDebt to improve logic and correctness 2026-02-13 03:58:11 +03:00
Alfred Kamanda 5255671a3d added the data key for the swap from balance 2026-02-13 03:56:55 +03:00
Alfred Kamanda c02aa99ed0 store the active swap from voucher data 2026-02-13 03:56:24 +03:00
Alfred Kamanda ba2c06c00a process and store the vouchers as an ordered list 2026-02-13 03:54:09 +03:00
Alfred Kamanda 8b6f8b9a43 process all voucher lists as ordered, with stables at the top 2026-02-12 19:22:38 +03:00
Alfred Kamanda 80ea357e9c added a new line for clear separation between voucher list and menu inputs 2026-02-12 19:19:52 +03:00
Alfred Kamanda 504fcb67d3 renamed the mpesa menu nodes for clarity 2026-02-12 16:24:12 +03:00
Alfred Kamanda 0e38ef1d04 updated the withdraw mpesa flow to support selection of a voucher 2026-02-12 16:23:18 +03:00
Alfred Kamanda 115cf2fbc9 added the minimum mpesa withdrawal amount config 2026-02-12 15:04:42 +03:00
Alfred Kamanda f4c8c45ed1 rename the function to match the ordered voucher data 2026-02-12 14:20:42 +03:00
Alfred Kamanda 1a61ea6de3 rename the function for reuse 2026-02-12 10:29:05 +03:00
Alfred Kamanda 50c2aff79e store the ordered list of vouchers with stables at the top 2026-02-12 10:25:53 +03:00
Alfred Kamanda ea71c08143 rename the data keys to store ordered voucher lists 2026-02-12 10:24:54 +03:00
Alfred Kamanda 5ed7cbd40a update the Mpesa response once someone requests for a withdrawal 2026-02-09 14:14:44 +03:00
Alfred Kamanda c4e2ed6db2 use the updated pool deposit URL
release / docker (push) Has been cancelled
2026-02-07 18:10:19 +03:00
Alfred Kamanda 7f6be9258d updated the env example comment on stable voucher addresses 2026-02-07 18:00:47 +03:00
Alfred Kamanda c548ea0700 added pool deposit functions 2026-02-07 17:57:46 +03:00
Alfred Kamanda e14387a975 added a node for initializing the pool deposit 2026-02-07 17:33:01 +03:00
Alfred Kamanda 4ce967967d added a node for confirming the pool deposit 2026-02-07 17:32:42 +03:00
Alfred Kamanda f397d77989 added a CATCH for invalid pool deposit amounts 2026-02-07 17:31:53 +03:00
Alfred Kamanda dc2f9fce44 change the order of vis statements for error handling 2026-02-07 17:30:32 +03:00
Alfred Kamanda 35692d2bfd prevent users from inputting amounts less than 0.1 2026-02-07 17:29:40 +03:00
Alfred Kamanda 857e237996 added translations for the pool deposit 2026-02-07 16:50:56 +03:00
Alfred Kamanda ab8d1535c4 added GetStableVoucherData 2026-02-06 16:40:57 +03:00
Alfred Kamanda eb25aca96d added pool deposit related functions to the local handler 2026-02-06 16:21:00 +03:00
Alfred Kamanda 601de0126a store the list of stable coins that the user has 2026-02-06 16:20:20 +03:00
Alfred Kamanda f61b56407b rename the flag to flag_no_stable_vouchers 2026-02-06 16:19:45 +03:00
Alfred Kamanda 16adfdaa8a added data keys to easily manage a user's stable coins 2026-02-06 16:18:14 +03:00
Alfred Kamanda f6dcc6db0e added the pool deposit amount node 2026-02-06 14:10:42 +03:00
Alfred Kamanda 1902ce226d added the pool deposit menu titles 2026-02-06 14:09:40 +03:00
Alfred Kamanda 7f2467873f added the pool deposit menu node 2026-02-06 14:05:54 +03:00
Alfred Kamanda 916ac11585 use the correct decimal when displaying the quote
release / docker (push) Has been cancelled
2026-02-05 19:58:14 +03:00
Alfred Kamanda 8223a0b4d5 added translations for voucher selection
release / docker (push) Has been cancelled
2026-02-04 17:02:50 +03:00
Alfred Kamanda c57aa220e6 show a default message if the user only has 1 voucher 2026-02-04 17:02:24 +03:00
Alfred Kamanda ce36e584dd check whether any of the users vouchers are stables or set a flag 2026-02-04 16:35:07 +03:00
Alfred Kamanda 3a4f824ab9 added a CATCH when no stable voucher exists during the pay debt 2026-02-04 16:31:32 +03:00
Alfred Kamanda f77c82f418 added a flag for flag_no_pay_debt_vouchers 2026-02-04 16:21:25 +03:00
Alfred Kamanda 7b461d9b64 add the env example for the Stable vouchers addresses 2026-02-04 16:17:07 +03:00
Alfred Kamanda 0f7be3147e move the pay debt functionality to the mpesa menu 2026-02-03 17:04:58 +03:00
Alfred Kamanda 6a4909b8a1 separate the main balance from the credit and debt calculation and UI 2026-02-03 17:03:38 +03:00
Alfred Kamanda 7783ba8835 removed unused data keys 2026-02-03 17:02:44 +03:00
Alfred Kamanda e4c10d23d3 reset the flags to clear out old states 2026-02-03 16:49:11 +03:00
Alfred Kamanda 70ae3c7818 debug: shorten the displayed content 2026-02-03 14:32:21 +03:00
Alfred Kamanda 94b2eca186 debug: change the size outputs 2026-02-03 14:23:21 +03:00
Alfred Kamanda fd7b3af57c added next and prev inputs for long menus 2026-02-03 14:19:10 +03:00
Alfred Kamanda 9ef27fda14 reset the api_call_error flag 2026-02-03 13:36:14 +03:00
Alfred Kamanda 42f7b0f8a7 remove the api failure flag if no swappable vouchers are found 2026-02-03 13:34:05 +03:00
Alfred Kamanda 85b8775fd0 return nil instead of an error to prevent failure 2026-02-03 13:32:13 +03:00
Alfred Kamanda 0b3b407ab7 add a CATCH for users who do not have vouchers 2026-02-03 13:31:44 +03:00
Alfred Kamanda 3949959aa3 use the correct terms for clarity
release / docker (push) Has been cancelled
2026-01-30 16:41:44 +03:00
Alfred Kamanda 99893eac5c include the ActiveSwapToDecimal on the SwapData 2026-01-30 16:34:52 +03:00
Alfred Kamanda 277e4e179d added a CATCH for a low amount response from the API 2026-01-30 16:33:44 +03:00
Alfred Kamanda ca2a50375b added functions to perform the debt removal 2026-01-30 15:13:33 +03:00
Alfred Kamanda 4dfccb3ff2 log the correct fields 2026-01-30 10:22:36 +03:00
Alfred Kamanda 88b5a33c2e update the sym name to be more descriptive 2026-01-29 19:37:33 +03:00
Alfred Kamanda a4f036c88d remove the amount as it is present in the response content 2026-01-29 19:29:35 +03:00
Alfred Kamanda 46e98b5b9e update the translations 2026-01-29 19:17:38 +03:00
Alfred Kamanda ead5dd7b8c store the filtered vouchers from the GetPoolSwappableFromVouchers 2026-01-29 17:10:20 +03:00
Alfred Kamanda 0a69e04229 added helper functions to add scaled down balances 2026-01-29 17:00:24 +03:00
Alfred Kamanda ea9875584f added the calc_credit_debt to the main.vis and local handler 2026-01-29 16:59:02 +03:00
Alfred Kamanda 6bb87a7b33 added the CalculateCreditAndDebt function 2026-01-29 16:57:00 +03:00
Alfred Kamanda cfc38402f0 display the credit and debt 2026-01-29 16:14:04 +03:00
Alfred Kamanda 07e0e877d5 added data keys for the credit and debt values 2026-01-29 16:08:53 +03:00
Alfred Kamanda f7de79f51a added option to go back to the main menu 2026-01-26 13:32:44 +03:00
Alfred Kamanda e2ff3d20d5 updated the resolveActivePoolAddress to resolveActivePoolDetails 2026-01-26 13:28:31 +03:00
Alfred Kamanda cbe5b211d8 added the local functions to the menu handler 2026-01-22 17:42:52 +03:00
Alfred Kamanda 101955c1b3 added a node to initialize the pay debt 2026-01-22 17:42:27 +03:00
Alfred Kamanda d0f7692fa2 added a node for the pay debt confirmation 2026-01-22 17:42:10 +03:00
Alfred Kamanda 7441fde4af added translations for the pay debt node 2026-01-22 17:40:49 +03:00
Alfred Kamanda adb7a402d0 added the Pay debt top node 2026-01-22 17:40:13 +03:00