handle normal send transactions based on the sym
This commit is contained in:
parent
8ce17a8d1e
commit
582f349be3
@ -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))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user