Skip to content

Commit

Permalink
BBQr - fix typo and better data handling
Browse files Browse the repository at this point in the history
  • Loading branch information
odudex committed Jun 7, 2024
1 parent ca13486 commit 6294935
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/krux/bbqr.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def deflate_compress(data):
d.write(data)
return stream.getvalue()
except:
raise ValueError("Error decompressing BBQR")
raise ValueError("Error compressing BBQR")


def deflate_decompress(data):
Expand Down
7 changes: 6 additions & 1 deletion src/krux/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,12 @@ def wallet_qr(self):
if self.wallet_qr_format == FORMAT_BBQR:
from .bbqr import encode_bbqr

return encode_bbqr(self.wallet_data, file_type="U"), FORMAT_BBQR
wallet_data = (
self.wallet_data.encode("utf-8")
if isinstance(self.wallet_data, str)
else self.wallet_data
)
return encode_bbqr(wallet_data, file_type="U"), FORMAT_BBQR
return (self.wallet_data, self.wallet_qr_format)

def obtain_addresses(self, i=0, limit=None, branch_index=0):
Expand Down

0 comments on commit 6294935

Please sign in to comment.