Commit Graph

281 Commits

Author SHA1 Message Date
Alfred Kamanda
35692d2bfd prevent users from inputting amounts less than 0.1 2026-02-07 17:29:40 +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
916ac11585 use the correct decimal when displaying the quote
Some checks failed
release / docker (push) Has been cancelled
2026-02-05 19:58:14 +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
6a4909b8a1 separate the main balance from the credit and debt calculation and UI 2026-02-03 17:03:38 +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
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
3949959aa3 use the correct terms for clarity
Some checks failed
release / docker (push) Has been cancelled
2026-01-30 16:41: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
ead5dd7b8c store the filtered vouchers from the GetPoolSwappableFromVouchers 2026-01-29 17:10:20 +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
e2ff3d20d5 updated the resolveActivePoolAddress to resolveActivePoolDetails 2026-01-26 13:28:31 +03:00
Alfred Kamanda
523f680276 append the flag_swap_transaction once all checks pass
Some checks failed
release / docker (push) Has been cancelled
2026-01-15 11:25:02 +03:00
Alfred Kamanda
b337c9260b add a debug statement 2026-01-15 11:17:41 +03:00
Alfred Kamanda
7d8fd065f0 default to a normal send if an error occurs on calculateSendCreditLimits 2026-01-15 10:56:20 +03:00
Alfred Kamanda
a447f230ca refactor the code to handle credit send or normal transactions 2026-01-13 12:45:27 +03:00
Alfred Kamanda
d586c41cca add sleep for 1 second between requests
Some checks failed
release / docker (push) Has been cancelled
2025-12-03 13:12:24 +03:00
Alfred Kamanda
1cb82e9099 call the mpesa rates API to get the rates 2025-12-02 12:28:28 +03:00
Alfred Kamanda
e658460845 Merge branch 'master' into mpesa-onramp-offramp 2025-11-28 11:54:29 +03:00
Alfred Kamanda
bbc5b8f82a Merge branch 'master' into update-balance-on-empty-vouchers 2025-11-28 11:42:40 +03:00
Alfred Kamanda
17c9925b14 convert the amount to an int before calling the MpesaTriggerOnramp API 2025-11-28 10:40:43 +03:00
Alfred Kamanda
9b8c5a021b added the send mpesa functionality with the use of config values 2025-11-27 16:45:56 +03:00
Alfred Kamanda
98bc2dbac1 refactored the code for proper transaction flow for normal and swap transfers 2025-11-27 13:33:00 +03:00
Alfred Kamanda
edaf527aa1 added the get mpesa functionality 2025-11-26 18:02:28 +03:00
alfred-mk
398610924b removed the debug output
Some checks failed
release / docker (push) Has been cancelled
2025-11-26 13:02:26 +03:00
alfred-mk
3fdb0e3426 update the symbol to send_max_amount with debug output 2025-11-26 12:56:04 +03:00
Alfred Kamanda
c2cf8e91e5 removed the print debug statements
Some checks failed
release / docker (push) Has been cancelled
2025-11-14 10:55:54 +03:00
Alfred Kamanda
03d6cbd429 added a debug for the returned content 2025-11-14 10:46:22 +03:00
Alfred Kamanda
ee41f73347 added a debug log 2025-11-14 10:41:34 +03:00
Alfred Kamanda
308dc93a91 return nil to CATCH the flag_api_call_error 2025-11-13 17:09:30 +03:00
Alfred Kamanda
208eac5a3c use the correct 'flag_api_call_error' 2025-11-13 01:44:50 +03:00
Alfred Kamanda
348185ef96 use l.Get for the language change
Some checks failed
release / docker (push) Has been cancelled
2025-10-30 12:36:11 +03:00
Alfred Kamanda
582f349be3 handle normal send transactions based on the sym 2025-10-30 11:12:16 +03:00
Alfred Kamanda
de539dc300 update the credit-send functionality to display the RAT data 2025-10-28 17:15:39 +03:00
Alfred Kamanda
6811cc12ec clear the current active voucher data if it exists when no vouchers exist 2025-10-23 10:29:14 +03:00
Alfred Kamanda
5cfdd949ff use the correct amount when initiating the transfer (the amount that has been swapped)
Some checks failed
release / docker (push) Has been cancelled
2025-10-22 17:32:35 +03:00
Alfred Kamanda
865dae4b7f correctly format amounts to 2 decimal places using TruncateDecimalString 2025-10-22 16:16:05 +03:00
Alfred Kamanda
0af41ea1f1 Merge branch 'master' into send-with-swap 2025-10-22 14:40:21 +03:00
Alfred Kamanda
1ba5424e0b cleaned up the code and removed the debug statement 2025-10-22 12:20:41 +03:00
Alfred Kamanda
5b4446c04a use the upstream APIError 2025-10-22 12:10:19 +03:00
Alfred Kamanda
bd98034a9b added debug line 2025-10-21 16:05:00 +03:00
Alfred Kamanda
95bc5ec6af set a different response content based on the API error code 2025-10-21 15:49:02 +03:00
Alfred Kamanda
20b4269358 add a custom error struct that carries both fields from the API error 2025-10-21 15:47:39 +03:00