send with swap #102

Merged
Alfred-mk merged 48 commits from send-with-swap into master 2025-11-12 08:54:08 +01:00
Showing only changes of commit 582f349be3 - Show all commits

View File

@ -335,8 +335,8 @@ func (h *MenuHandlers) MaxAmount(ctx context.Context, sym string, input []byte)
// Format the active balance amount to 2 decimal places // Format the active balance amount to 2 decimal places
formattedBalance, _ := store.TruncateDecimalString(string(activeBal), 2) formattedBalance, _ := store.TruncateDecimalString(string(activeBal), 2)
// If normal transaction, return balance // If normal transaction, or if the sym is max_amount, return balance
if string(transactionType) == "normal" { if string(transactionType) == "normal" || sym == "max_amount" {
res.FlagReset = append(res.FlagReset, flag_swap_transaction) res.FlagReset = append(res.FlagReset, flag_swap_transaction)
res.Content = l.Get("Maximum amount: %s %s\nEnter amount:", formattedBalance, string(activeSym)) res.Content = l.Get("Maximum amount: %s %s\nEnter amount:", formattedBalance, string(activeSym))