|
|
|
@ -35,7 +35,7 @@ def withdraw(update, context):
|
|
|
|
|
sender = db.User.get(telegram_id=update.message.from_user['id'])
|
|
|
|
|
sender_balances = wownero.Wallet().balances(account=sender.account_index)
|
|
|
|
|
if amount > sender_balances[1]:
|
|
|
|
|
update.message.reply_text(f'You do not have sufficient funds to send {amount} WOW. Check your /balance')
|
|
|
|
|
update.message.reply_text(f'You do not have sufficient funds to withdraw {amount} WOW. Check your /balance')
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
# transfer funds to given address
|
|
|
|
@ -49,5 +49,5 @@ def withdraw(update, context):
|
|
|
|
|
logging.error(f'Transaction failure details for {sender.telegram_user} ({sender.telegram_id}): {tx}')
|
|
|
|
|
update.message.reply_text(f'Failed to withdraw Wownero. Reason: "{tx["message"]}"')
|
|
|
|
|
except Exception as e:
|
|
|
|
|
logging.error(f'Unable to send transfer: {e}. Debug: {update.message}')
|
|
|
|
|
logging.error(f'Unable to withdraw transfer: {e}. Debug: {update.message}')
|
|
|
|
|
update.message.reply_text('Failed to withdraw Wownero. Ask for help.')
|
|
|
|
|