Skip to content

Commit

Permalink
Respect testnet address form flag
Browse files Browse the repository at this point in the history
dungeon-master-666 committed Feb 19, 2024
1 parent 9c6d7d9 commit f3625bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pytonlib/utils/address.py
Original file line number Diff line number Diff line change
@@ -46,9 +46,9 @@ def account_forms(raw_form, test_only=False):
workchain_tag = b'\xff' if workchain == -1 else workchain.to_bytes(1, "big")
btag = bounceable_tag
nbtag = non_bounceable_tag
# if test_only:
# btag = (btag[0] | 0x80).to_bytes(1,'big')
# nbtag = (nbtag[0] | 0x80).to_bytes(1,'big')
if test_only:
btag = (btag[0] | 0x80).to_bytes(1,'big')
nbtag = (nbtag[0] | 0x80).to_bytes(1,'big')
preaddr_b = btag + workchain_tag + address
preaddr_u = nbtag + workchain_tag + address
b64_b = base64.b64encode(preaddr_b+calcCRC(preaddr_b)).decode('utf8')

0 comments on commit f3625bb

Please sign in to comment.