ensure that any stable coin can do a direct transfer to Mpesa
This commit is contained in:
parent
77f0585b56
commit
0d92872d90
@ -103,8 +103,10 @@ func (h *MenuHandlers) GetMpesaMaxLimit(ctx context.Context, sym string, input [
|
|||||||
minksh := fmt.Sprintf("%f", config.MinMpesaWithdrawAmount())
|
minksh := fmt.Sprintf("%f", config.MinMpesaWithdrawAmount())
|
||||||
minKshFormatted, _ := store.TruncateDecimalString(minksh, 0)
|
minKshFormatted, _ := store.TruncateDecimalString(minksh, 0)
|
||||||
|
|
||||||
// If SAT is the same as RAT, return early with KSH format
|
// If SAT is the same as RAT (default USDm),
|
||||||
if string(metadata.TokenAddress) == string(recipientActiveAddress) {
|
// or if the voucher is a stable coin
|
||||||
|
// return early with KSH format
|
||||||
|
if string(metadata.TokenAddress) == string(recipientActiveAddress) || isStableVoucher(metadata.TokenAddress) {
|
||||||
txType = "normal"
|
txType = "normal"
|
||||||
// Save the transaction type
|
// Save the transaction type
|
||||||
if err := userStore.WriteEntry(ctx, sessionId, storedb.DATA_SEND_TRANSACTION_TYPE, []byte(txType)); err != nil {
|
if err := userStore.WriteEntry(ctx, sessionId, storedb.DATA_SEND_TRANSACTION_TYPE, []byte(txType)); err != nil {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user