allow-stables-direct-to-mpesa #118

Merged
Alfred-mk merged 5 commits from allow-stables-direct-to-mpesa into master 2026-02-26 18:17:43 +01:00
Showing only changes of commit 0d92872d90 - Show all commits

View File

@ -103,8 +103,10 @@ func (h *MenuHandlers) GetMpesaMaxLimit(ctx context.Context, sym string, input [
minksh := fmt.Sprintf("%f", config.MinMpesaWithdrawAmount())
minKshFormatted, _ := store.TruncateDecimalString(minksh, 0)
// If SAT is the same as RAT, return early with KSH format
if string(metadata.TokenAddress) == string(recipientActiveAddress) {
// If SAT is the same as RAT (default USDm),
// or if the voucher is a stable coin
// return early with KSH format
if string(metadata.TokenAddress) == string(recipientActiveAddress) || isStableVoucher(metadata.TokenAddress) {
txType = "normal"
// Save the transaction type
if err := userStore.WriteEntry(ctx, sessionId, storedb.DATA_SEND_TRANSACTION_TYPE, []byte(txType)); err != nil {