Skip to content

Commit

Permalink
Bug fix, v1.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-fireblocks committed Sep 1, 2020
1 parent 11e0ce1 commit ead8956
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
44 changes: 22 additions & 22 deletions fireblocks_sdk/api_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,6 @@ def __init__(self, peer_type, peer_id, one_time_address=None):
self.oneTimeAddress = one_time_address


class TransferTicketTerm(object):
def __init__(self, network_connection_id, outgoing, asset, amount, note=None, operation=TRANSACTION_TRANSFER):
"""Defines a transfer ticket's term
Args:
network_connection_id (str): The Fireblocks network connection on which this term should be fulfilled
outgoing (bool): True means that the term is from the initiator of the ticket
asset (str): The asset of term that was agreed on
amount (str): The amount of the asset that should be transferred
note (str, optional): Custom note that can be added to the term
"""

self.networkConnectionId = str(network_connection_id)
self.outgoing = bool(outgoing)
self.asset = str(asset)
self.amount = str(amount)
if note:
self.note = str(note)
self.operation = operation


TRANSACTION_TRANSFER = "TRANSFER"
TRANSACTION_MINT = "MINT"
TRANSACTION_BURN = "BURN"
Expand Down Expand Up @@ -110,4 +88,26 @@ def __init__(self, network_connection_id, outgoing, asset, amount, note=None, op

PEER_TYPES = (VAULT_ACCOUNT, EXCHANGE_ACCOUNT, INTERNAL_WALLET, EXTERNAL_WALLET, UNKNOWN_PEER, FIAT_ACCOUNT, NETWORK_CONNECTION, COMPOUND)

class TransferTicketTerm(object):
def __init__(self, network_connection_id, outgoing, asset, amount, note=None, operation=TRANSACTION_TRANSFER):
"""Defines a transfer ticket's term
Args:
network_connection_id (str): The Fireblocks network connection on which this term should be fulfilled
outgoing (bool): True means that the term is from the initiator of the ticket
asset (str): The asset of term that was agreed on
amount (str): The amount of the asset that should be transferred
note (str, optional): Custom note that can be added to the term
"""

self.networkConnectionId = str(network_connection_id)
self.outgoing = bool(outgoing)
self.asset = str(asset)
self.amount = str(amount)
if note:
self.note = str(note)
self.operation = operation


class FireblocksApiException(Exception): pass
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
setup(
name = 'fireblocks_sdk',
packages = ['fireblocks_sdk'],
version = '1.5.4',
version = '1.5.5',
license='MIT',
description = 'Fireblocks python SDK',
url = 'https://github.com/fireblocks/fireblocks-sdk-py',
download_url = 'https://github.com/fireblocks/fireblocks-sdk-py/archive/v1.5.4.tar.gz',
download_url = 'https://github.com/fireblocks/fireblocks-sdk-py/archive/v1.5.5.tar.gz',
keywords = ['Fireblocks', 'SDK'],
install_requires=[
'PyJWT==1.7.1',
Expand Down

0 comments on commit ead8956

Please sign in to comment.