Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscription skips first transaction to an empty wallet #292

Open
niknaylos opened this issue Jan 19, 2025 · 3 comments
Open

Subscription skips first transaction to an empty wallet #292

niknaylos opened this issue Jan 19, 2025 · 3 comments

Comments

@niknaylos
Copy link

Im encountering the issue where first incoming usdt transaction on empty wallet is being skipped by SubscribeOnTransactions()

Use case: I generate unique subwallets for my customers and receive their payments in usdt there, to confirm deposits I want to subscribe on subwallet's transactions

However first transaction to a fresh subwallet is not being captured by SubscribeOnTransactions()
Is there a workaround for this scenario?

example transaction that wasnt captured:
https://tonviewer.com/EQCgsg5UnDSguVJlLAZHNRG4r5RVvQu-cupAuY5SfQOxdltC

I created sample issue repo that creates fresh subwallet and subscribes on its transactions just in case:

https://github.com/niknaylos/sample-issue

@niknaylos
Copy link
Author

Repository owner deleted a comment from Dranox-Hub Jan 20, 2025
@xssnick
Copy link
Owner

xssnick commented Jan 20, 2025

I tried to run SubscribeOnTransactions with your example address EQCgsg5UnDSguVJlLAZHNRG4r5RVvQu-cupAuY5SfQOxdltC, and it returned this single tx, seems working for me. Or it happens only when address was not initialized before starting subscribe?

@niknaylos
Copy link
Author

niknaylos commented Jan 20, 2025

Ye, the issue happens if account is nonexist before first transaction arrives and has no lastTxLt

The commit I mentioned seems to be fixing the issue as long as account goes nonexist -> uninit after the first transaction (otherwise transaction wont be captured anyway)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@xssnick @niknaylos and others