Hello. I'm trying to make a bot with user balances using the example from here (https://docs.ton.org/develop/dapps/tutorials/accept-payments-in-a-telegram-bot-2#gettransactions-method). The problem is that when a user is registered/added to the database, his id is in the form of a number. But when I follow the documentation and get information about the transactions of the specified wallet, then there is no user id that made the transaction. In addition, in the transaction data, I do not find the amount that the user sent (in this case, 0.1 TON). Can anyone tell me how to correctly identify the user by transaction and amount, so that you can replenish the user's balance in the bot's database? The wallet for the bot was created on TON play.

May 26, 2023, 2:35 PM
"user ids" don't make transactions. You should associate users and their wallets internally
May 26, 2023, 3:05 PM
Depends... you can attach uid to wallet string. We do it on wax blockchain chain all the time. The beauty of ton is using telegram to integrate to ton to link user id to wallet string more effectively. So basically, if you can write in a wallet connect to bot the database the user id to the connect pull you should be able to reference it later on drops
May 26, 2023, 3:23 PM
well, you can try to generate wallet using tg user id as subwallet_id
May 26, 2023, 3:24 PM
Im talking a direct connection to tonhub or tonkeeper
If you were to create an evm to tvm you do the same thing via smart contract. Attach the eth address to the ton address string
If i understood funC like i understood antelopeio i could explain it in contracting form using the telegram api structure
May 26, 2023, 3:33 PM
Thank you. But how can I know that a wallet from a transaction belongs to a specific user? Ask the user for his wallet number or are there other ways to find out?
May 26, 2023, 5:50 PM
require them to attach a comment that you generate internally and check the comment
May 26, 2023, 5:54 PM

© 2024 Draquery.com All rights reserved.