mirror of
https://git.wownero.com/lza_menace/tg-bot.git
synced 2024-08-15 00:23:12 +00:00
21 lines
720 B
Python
21 lines
720 B
Python
import logging
|
|
from telegram import ParseMode
|
|
from tipbot import wownero
|
|
from tipbot import db
|
|
from tipbot.helpers.decorators import wallet_rpc_required, log_event, registration_required, check_debug
|
|
from tipbot.helpers.utils import generate_qr
|
|
|
|
|
|
@wallet_rpc_required
|
|
@registration_required
|
|
@log_event
|
|
@check_debug
|
|
def deposit(update, context):
|
|
u = db.User.get(telegram_id=update.message.from_user['id'])
|
|
address = wownero.Wallet().addresses(account=u.account_index)[0]
|
|
update.message.reply_text(f'Deposit address for {u.telegram_user}: {address}')
|
|
update.message.reply_photo(
|
|
photo=generate_qr(address),
|
|
caption=f'{u.telegram_user} deposit address: {address}',
|
|
quote=False
|
|
)
|