Skip to content

Commit

Permalink
Fail on low fee fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-fireblocks committed Nov 17, 2021
1 parent e39c3dd commit e7d6393
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions fireblocks_sdk/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ def create_internal_wallet_asset(self, wallet_id, asset_id, address, tag=None, i
)


def create_transaction(self, asset_id, amount=None, source=None, destination=None, fee=None, gas_price=None, wait_for_status=False, tx_type=TRANSACTION_TRANSFER, note=None, network_fee=None, customer_ref_id=None, replace_tx_by_hash=None, extra_parameters=None, destinations=None, fee_level=None, fail_on_fee=None, max_fee=None, gas_limit=None, idempotency_key=None, external_tx_id=None, treat_as_gross_amount=None, force_sweep=None):
def create_transaction(self, asset_id, amount=None, source=None, destination=None, fee=None, gas_price=None, wait_for_status=False, tx_type=TRANSACTION_TRANSFER, note=None, network_fee=None, customer_ref_id=None, replace_tx_by_hash=None, extra_parameters=None, destinations=None, fee_level=None, fail_on_low_fee=None, max_fee=None, gas_limit=None, idempotency_key=None, external_tx_id=None, treat_as_gross_amount=None, force_sweep=None):
"""Creates a new transaction
Args:
Expand All @@ -652,7 +652,7 @@ def create_transaction(self, asset_id, amount=None, source=None, destination=Non
extra_parameters (object, optional)
destinations (list of TransactionDestination objects, optional): For UTXO based assets, send to multiple destinations which should be specified using this field.
fee_level (FeeLevel, optional): Transaction fee level: either HIGH, MEDIUM, LOW.
fail_on_fee (bool, optional): False by default, if set to true and MEDIUM fee level is higher than the one specified in the transaction, the transction will fail.
fail_on_low_fee (bool, optional): False by default, if set to true and MEDIUM fee level is higher than the one specified in the transaction, the transction will fail.
max_fee (str, optional): The maximum fee (gas price or fee per byte) that should be payed for the transaction.
gas_limit (number, optional): For ETH-based assets only.
idempotency_key (str, optional)
Expand Down Expand Up @@ -693,8 +693,8 @@ def create_transaction(self, asset_id, amount=None, source=None, destination=Non
if max_fee:
body["maxFee"] = max_fee

if fail_on_fee:
body["failOnFee"] = fail_on_fee
if fail_on_low_fee:
body["failOnLowFee"] = fail_on_low_fee

if gas_price:
body["gasPrice"] = str(gas_price)
Expand Down
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.6.8',
version = '1.6.9',
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.6.8.tar.gz',
download_url = 'https://github.com/fireblocks/fireblocks-sdk-py/archive/v1.6.9.tar.gz',
keywords = ['Fireblocks', 'SDK'],
install_requires=[
'PyJWT==1.7.1',
Expand Down

0 comments on commit e7d6393

Please sign in to comment.