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

[Solved] DANGEROUS_TRANSACTION: Transfer to uninited wallet / ACCOUNT_TYPE_UNKNOWN #31

Closed
d3cryptofc opened this issue Jun 20, 2023 · 2 comments

Comments

@d3cryptofc
Copy link

d3cryptofc commented Jun 20, 2023

Hello devs!

I was able to import my Tonkeeper wallet, address and balance are right, but when i try a TON transfer an error is displayed.

Versions
Python 3.11
ton 0.26

Code

await wallet.transfer(
  destination='EQDknEVVsW6neTn5w68wvzflkzC9Y--TvcDC7IlSJnWhwzRv',
  amount=client.to_nano(0.01),
  comment='test'
)

Traceback

future: <Task finished name='Task-1' coro=<main() done, defined at /home/lelzin/Área de trabalho/test-pytonlib/main.py:31> exception=TonlibError({'@type': 'error', 'code': 400, 'message': 'DANGEROUS_TRANSACTION: Transfer to uninited wallet', '@extra': '1687260860.1344755:0:0.5603447335617572'})>
Traceback (most recent call last):
  File "/home/lelzin/Área de trabalho/test-pytonlib/main.py", line 41, in main
    print(await wallet.transfer(
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lelzin/Área de trabalho/test-pytonlib/.venv/lib/python3.11/site-packages/ton/account/wallet_methods.py", line 86, in transfer
    return await self.send_messages(messages, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lelzin/Área de trabalho/test-pytonlib/.venv/lib/python3.11/site-packages/ton/account/wallet_methods.py", line 51, in send_messages
    query_id = (await self.client.execute(query)).id
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lelzin/Área de trabalho/test-pytonlib/.venv/lib/python3.11/site-packages/ton/client/tonlib_methods.py", line 36, in execute
    result = await self.tonlib_wrapper.execute(query, timeout=(timeout or self.default_timeout))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lelzin/Área de trabalho/test-pytonlib/.venv/lib/python3.11/site-packages/ton/tonlibjson.py", line 175, in execute
    result = await self._execute(query, timeout=timeout)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ton.tonlibjson.TonlibError: DANGEROUS_TRANSACTION: Transfer to uninited wallet

What does that mean? Could anyone help me? Thanks devs

@d3cryptofc
Copy link
Author

d3cryptofc commented Jun 20, 2023

I think that i solved this issue, 'uninited' means that my destination wallet has not any transfer to other wallet by Tonkeeper, when i did it was solved.

image

Also is possible transfer to uninited accounts passing allow_send_to_uninited=True parameter on transfer() method. See more..

However, other error was thrown:

ton.tonlibjson.TonlibError: ACCOUNT_TYPE_UNKNOWN

Note: I am using v4r2 type, would be this error about it?

@d3cryptofc d3cryptofc changed the title DANGEROUS_TRANSACTION: Transfer to uninited wallet DANGEROUS_TRANSACTION: Transfer to uninited wallet / ACCOUNT_TYPE_UNKNOWN Jun 20, 2023
@d3cryptofc
Copy link
Author

d3cryptofc commented Jun 20, 2023

My suspect was confirmed when readed the documentation:

source: (str) Wallet version. It is better not to change, because others are not supported by libtonlibjson :(

Transferred successfully when imported a v3R2 wallet.

@d3cryptofc d3cryptofc changed the title DANGEROUS_TRANSACTION: Transfer to uninited wallet / ACCOUNT_TYPE_UNKNOWN [Solved] DANGEROUS_TRANSACTION: Transfer to uninited wallet / ACCOUNT_TYPE_UNKNOWN Jun 20, 2023
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

1 participant