From 3e9d8404b2592f90238b4b82ba63c2f031dc4d70 Mon Sep 17 00:00:00 2001 From: "pritam.ghanghas@gmail.com" Date: Sat, 15 Apr 2023 20:38:42 +0530 Subject: [PATCH] fix: base48 decoding fix #NEBD-105 --- hm_pyhelper/gateway_grpc/client.py | 7 +++++-- setup.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hm_pyhelper/gateway_grpc/client.py b/hm_pyhelper/gateway_grpc/client.py index cb8f163..2359d4c 100644 --- a/hm_pyhelper/gateway_grpc/client.py +++ b/hm_pyhelper/gateway_grpc/client.py @@ -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 diff --git a/setup.py b/setup.py index 0a88cc6..0b5639a 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( name='hm_pyhelper', - version='0.14.7', + version='0.14.8', author="Nebra Ltd", author_email="support@nebra.com", description="Helium Python Helper",