xeroc / piston-lib

Python Library for Steem
MIT License
40 stars 33 forks source link

Fix memo encryption and decryption for non-steem networks #67

Closed bitphage closed 6 years ago

bitphage commented 6 years ago

Fixes following error:

Traceback (most recent call last):
  File "./transfer.py", line 18, in transfer
    steem_instance.transfer(to, amount, asset, memo=memo, account=account)
  File "/home/vvk/devel/golos/golos-scripts/venv/lib/python3.6/site-packages/piston/steem.py", line 673, in transfer
    prefix=self.rpc.chain_params["prefix"]
  File "/home/vvk/devel/golos/golos-scripts/venv/lib/python3.6/site-packages/pistonbase/memo.py", line 104, in encode_memo
    tx = transactions.Memo(**s)
  File "/home/vvk/devel/golos/golos-scripts/venv/lib/python3.6/site-packages/pistonbase/operations.py", line 108, in __init__
    ('from', PublicKey(kwargs["from"], prefix=prefix)),
  File "/home/vvk/devel/golos/golos-scripts/venv/lib/python3.6/site-packages/graphenebase/account.py", line 216, in __init__
    self._pk = Base58(pk, prefix=prefix)
  File "/home/vvk/devel/golos/golos-scripts/venv/lib/python3.6/site-packages/graphenebase/base58.py", line 62, in __init__
    raise ValueError("Error loading Base58 object")
ValueError: Error loading Base58 object
codecov-io commented 6 years ago

Codecov Report

Merging #67 into develop will decrease coverage by 0.07%. The diff coverage is 25%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #67      +/-   ##
===========================================
- Coverage    53.65%   53.57%   -0.08%     
===========================================
  Files           35       34       -1     
  Lines         3025     3020       -5     
===========================================
- Hits          1623     1618       -5     
  Misses        1402     1402
Impacted Files Coverage Δ
piston/steem.py 42.15% <0%> (ø) :arrow_up:
pistonbase/memo.py 85.71% <33.33%> (ø) :arrow_up:
pistonbase/objecttypes.py

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7d28b2a...5db8eea. Read the comment docs.