fuck markdown (for now)

master
lza_menace 4 years ago
parent 928f7b00af
commit a6171e9df1

@ -1,6 +1,5 @@
import logging import logging
from decimal import Decimal from decimal import Decimal
from telegram import ParseMode
from tipbot import wownero from tipbot import wownero
from tipbot import db from tipbot import db
from tipbot.helpers.decorators import wallet_rpc_required, log_event, registration_required, check_debug from tipbot.helpers.decorators import wallet_rpc_required, log_event, registration_required, check_debug
@ -63,8 +62,8 @@ def tip(update, context):
tx = wownero.Wallet().transfer(dest_address=address, amount=wownero.as_wownero(amount), priority=2, account=tipper.account_index) tx = wownero.Wallet().transfer(dest_address=address, amount=wownero.as_wownero(amount), priority=2, account=tipper.account_index)
if 'tx_hash' in tx: if 'tx_hash' in tx:
h = tx['tx_hash'] h = tx['tx_hash']
msg = f'Tipped @{target_un} {amount} WOW\! TX ID: [{h}](https://wownero.club/transaction/{h})' msg = f'Tipped @{target_un} {amount} WOW! Tx: {h}'
update.message.reply_text(msg, parse_mode=ParseMode.MARKDOWN_V2) update.message.reply_text(msg)
else: else:
logging.error(f'Transaction failure details for {tipper.telegram_user} ({tipper.telegram_id}): {tx}') logging.error(f'Transaction failure details for {tipper.telegram_user} ({tipper.telegram_id}): {tx}')
update.message.reply_text(f'Failed to send a tip. Reason: "{tx["message"]}"') update.message.reply_text(f'Failed to send a tip. Reason: "{tx["message"]}"')

@ -1,6 +1,5 @@
import logging import logging
from decimal import Decimal from decimal import Decimal
from telegram import ParseMode
from tipbot import wownero from tipbot import wownero
from tipbot import db from tipbot import db
from tipbot.helpers.decorators import wallet_rpc_required, log_event, registration_required, check_debug from tipbot.helpers.decorators import wallet_rpc_required, log_event, registration_required, check_debug
@ -44,8 +43,8 @@ def withdraw(update, context):
tx = wownero.Wallet().transfer(dest_address=address, amount=wownero.as_wownero(amount), priority=2, account=sender.account_index) tx = wownero.Wallet().transfer(dest_address=address, amount=wownero.as_wownero(amount), priority=2, account=sender.account_index)
if 'tx_hash' in tx: if 'tx_hash' in tx:
h = tx['tx_hash'] h = tx['tx_hash']
msg = f'Sent {amount} WOW\! TX ID: [{h}](https://wownero.club/transaction/{h})' msg = f'Sent {amount} WOW! Tx: {h}'
update.message.reply_text(msg, parse_mode=ParseMode.MARKDOWN_V2) update.message.reply_text(msg)
else: else:
logging.error(f'Transaction failure details for {sender.telegram_user} ({sender.telegram_id}): {tx}') 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"]}"') update.message.reply_text(f'Failed to withdraw Wownero. Reason: "{tx["message"]}"')

Loading…
Cancel
Save