Skip to content

Commit

Permalink
Extra currency support
Browse files Browse the repository at this point in the history
  • Loading branch information
kdimentionaltree committed Feb 21, 2025
1 parent d0af890 commit 903456e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
7 changes: 3 additions & 4 deletions ton-http-api/.docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
RUN apt-get install -y git cmake wget python3 python3-pip libsecp256k1-dev libsodium-dev libc6
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get update && apt-get -y install tzdata
RUN apt-get update && apt-get install -y git cmake wget python3 python3-pip

# python requirements
ADD ./requirements.txt /tmp/requirements.txt
Expand Down
3 changes: 2 additions & 1 deletion ton-http-api/pyTON/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,10 @@ async def get_wallet_information(
"""
address = prepare_address(address)
result = await tonlib.raw_get_account_state(address)
res = {'wallet': False, 'balance': 0, 'account_state': None, 'wallet_type': None, 'seqno': None}
res = {'wallet': False, 'balance': 0, 'extra_currencies': [], 'account_state': None, 'wallet_type': None, 'seqno': None}
res["account_state"] = address_state(result)
res["balance"] = result["balance"] if (result["balance"] and int(result["balance"]) > 0) else 0
res["extra_currencies"] = result["extra_currencies"]
if "last_transaction_id" in result:
res["last_transaction_id"] = result["last_transaction_id"]
ci = sha256(result["code"])
Expand Down
2 changes: 1 addition & 1 deletion ton-http-api/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ requests==2.28.0
ring==0.10.1
uvicorn==0.17.6
gunicorn==20.1.0
pytonlib==0.0.63
pytonlib==0.0.64
inject==4.3.1
9 changes: 5 additions & 4 deletions ton-http-api/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,19 @@
'ring==0.10.1',
'uvicorn==0.17.6',
'gunicorn==20.1.0',
'pytonlib==0.0.58',
'pytonlib==0.0.64',
'inject==4.3.1'
],
package_data={},
zip_safe=True,
python_requires='>=3.7',
python_requires='>=3.9',
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: Other/Proprietary License",
"Topic :: Software Development :: Libraries"
],
Expand Down

0 comments on commit 903456e

Please sign in to comment.