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

Fix object parser #45

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Fix object parser #45

wants to merge 13 commits into from

Conversation

d0rich
Copy link

@d0rich d0rich commented Jun 22, 2024

@dvlkv

This PR is created to fix issues like #10, tact-lang/tact#115 while getting responses with complex structures created via Tact.

Mostly I've covered parser code with types and then fixed several issues connected with incorrect return statements. Now it works fine on my internal repository.

@anton-trunov
Copy link

Is this existing PR related? #43

@d0rich
Copy link
Author

d0rich commented Jun 22, 2024

Is this existing PR related? #43

Yes, it is a related issue. I just haven't added lists parsing support, because I don't have any example of server responses with lists.

@d0rich
Copy link
Author

d0rich commented Jun 23, 2024

@dvlkv @anton-trunov it would be nice if somebody from the TON would provide examples of the TVM serialized objects containing all the possible data types inside for the tests.

@aSpite
Copy link

aSpite commented Jun 23, 2024

I have already sent a PR to address this issue. It is not necessary to add a new List object, because @ton/core only works with tuples. It is better to do as in PR 43

@d0rich
Copy link
Author

d0rich commented Dec 1, 2024

@dvlkv my tact-based project still doesn't work with this library from the box. I still need to create a patch for the package using code from this PR.

I've rebased my suggestion on the latest version available and changed the source file itself. Hope, it will help you understand what is the issue more clearly.

I only extracted types to the new util file. I think, it is better than adding all these types to the TonClient.ts. Furthermore, I would not recommend deleting them, as it exactly the thing, that helped me find reason of failures, and it can help avoid new ones in the future.

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

Successfully merging this pull request may close these issues.

4 participants