Skip to content

Commit

Permalink
outbout bittrex memos implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
litepresence committed Nov 6, 2021
1 parent f3e4508 commit e878a28
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def get_dynamic_globals():


# RPC POST WITHDRAWALS
def post_withdrawal_bittrex(amount, nominator, api, keys):
def post_withdrawal_bittrex(amount, nominator, api, keys, memo=""):
"""
send funds using the bittrex api
bittrex sends the amount requested less the tx fee, so tx fee is added
Expand All @@ -95,6 +95,8 @@ def post_withdrawal_bittrex(amount, nominator, api, keys):
"quantity": str(float(amount)),
"cryptoAddress": str(nominator),
}
if memo:
params.update({"cryptoAddressTag": str(memo)})
# returns response.json() as dict or list python object
ret = json_dumps(bittrex_api.post_withdrawal(**params))
if isinstance(ret, dict):
Expand Down
7 changes: 6 additions & 1 deletion stake_bitshares.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,12 @@ def serve_admin(params, keys):
msg["api"] = api
msg["memo"] = memo
msg["response"] = json_loads(
post_withdrawal_bittrex(transfer_amount, nominator, api, keys)
post_withdrawal_bittrex(
transfer_amount,
nominator,
api,
keys,
memo="loan_to_bmg")
)
msg[
"status"
Expand Down

0 comments on commit e878a28

Please sign in to comment.