revert to a normal transaction of the recipient phone number is not present
This commit is contained in:
parent
6553c5a773
commit
9e93bb4b59
@ -414,12 +414,15 @@ func (h *MenuHandlers) MaxAmount(ctx context.Context, sym string, input []byte)
|
|||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the recipient's phone number to read other data items
|
// Get the recipient's phone number to read other data items (*)
|
||||||
recipientPhoneNumber, err := userStore.ReadEntry(ctx, sessionId, storedb.DATA_RECIPIENT_PHONE_NUMBER)
|
recipientPhoneNumber, err := userStore.ReadEntry(ctx, sessionId, storedb.DATA_RECIPIENT_PHONE_NUMBER)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// invalid state
|
// revert to normal transaction
|
||||||
return res, err
|
res.FlagReset = append(res.FlagReset, flag_swap_transaction)
|
||||||
|
res.Content = l.Get("Maximum amount: %s %s\nEnter amount:", formattedBalance, string(activeSym))
|
||||||
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
recipientActiveSym, recipientActiveAddress, recipientActiveDecimal, err := h.getRecipientData(ctx, string(recipientPhoneNumber))
|
recipientActiveSym, recipientActiveAddress, recipientActiveDecimal, err := h.getRecipientData(ctx, string(recipientPhoneNumber))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return res, err
|
return res, err
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user