tinymanorg / tinyman-py-sdk

Tinyman Python SDK
MIT License
117 stars 60 forks source link

Update wait_for_confirmation with the official one #38

Closed onuralken closed 2 years ago

onuralken commented 2 years ago

Can you please update internal usages? I think it is better if Tinyman SDK use from tinyman.utils import wait_for_confirmation in the examples, clients etc.

So the Tinyman SDK users won't get the warning if they don't use the wait_for_confirmation individually.

There is only one usage of wait_for_confirmation throughout the package which is the Tinyman SDK one. Since I have implemented the official one inside the current one not sure if there is any way to prevent that issue.

gokselcoban commented 2 years ago

Do you mean there is one in the tinyman/utils.py? https://github.com/tinymanorg/tinyman-py-sdk/blob/main/tinyman/utils.py#L116 We may use wait_for_confirmation_algosdk here.

Also, we may update the following import statements with from algosdk.future.transaction import wait_for_confirmation. https://github.com/tinymanorg/tinyman-py-sdk/blob/main/examples/swapping1_less_convenience.py#L11 https://github.com/tinymanorg/tinyman-py-sdk/blob/main/tinyman/v1/client.py#L6

What do you think?

onuralken commented 2 years ago

Ohh, got it. So you want me to totally swap to algosdk one and let the Tinyman SDK there incase someone is using it individually. That's way better than what I did. Thanks a lot!

gokselcoban commented 2 years ago

Can you please update internal usages? I think it is better if Tinyman SDK use from tinyman.utils import wait_for_confirmation in the examples, clients etc.

I realized that, It should be from algosdk.future.transaction import wait_for_confirmation. Sorry for the typo and confusion.