-
Notifications
You must be signed in to change notification settings - Fork 64
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
ASA with Unicode character 🪙 in unit-name raises KeyError in pools.py #24
Comments
Can you explain why you need this? |
I have to admit that the code we use is a few months old and we have used it to check is there a liquidity pool created for a given pair of ASA. Is there some better method for us to retrieve such information? |
Ah I see. It would still be odd if this was the first line to raise an error in that case though. If a pool exists then
Another way is to use Tinyman's analytics APIs to retrieve a list of pools or to follow the chain for pool creations and verify their integrity by comparing addresses using this SDK. That's what the analytics backend does. |
This is our original code:
And it raises KeyError on the third line above.
I think we'd rather stick to "Simple is better than complex." and "Easier to ask for forgiveness than permission.". :)
|
Sorry, the title is misleading, it's not an empty unit name, it's the Unicode character in the unit name that causes this: https://algoexplorer.io/tx/QJGZVVSTOTAISJFU5VC73GPBEJ566LUQWRQAQEREYT7KPSP5HOIQ
|
The actual issue seems to be in algod.asset_info not being able to parse unicode. |
I couldn't reproduce the issue with the latest versions of Tinyman and Algo SDK. Looks like the issue is resolved. Thank you for reporting it. |
A workaround for us is just a simple
liquidity_asset['params'].get('name')
, but you'd probably want a solution/name that includes the other ASA in the pool.The text was updated successfully, but these errors were encountered: