Skip to content

Commit

Permalink
Merge pull request #251 from NebraLtd/pritam/b58decode
Browse files Browse the repository at this point in the history
fix: base58 decoding fix #NEBD-105
  • Loading branch information
shawaj authored Apr 15, 2023
2 parents cc6e3a9 + 3e9d840 commit 431c825
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions hm_pyhelper/gateway_grpc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,12 @@ def create_add_gateway_txn(self, owner_address: str, payer_address: str,
ref:
https://github.com/helium/proto/blob/master/src/service/local.proto#L38
"""
# base58 gives version number as first byte. Get rid of it.
owner = base58.b58decode_check(owner_address)[1:]
payer = base58.b58decode_check(payer_address)[1:]
response = self.stub.add_gateway(local_pb2.add_gateway_req(
owner=owner_address.encode('utf-8'),
payer=payer_address.encode('utf-8'),
owner=owner,
payer=payer,
staking_mode=staking_mode
))
return response.add_gateway_txn
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setup(
name='hm_pyhelper',
version='0.14.7',
version='0.14.8',
author="Nebra Ltd",
author_email="[email protected]",
description="Helium Python Helper",
Expand Down

0 comments on commit 431c825

Please sign in to comment.