-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When using estimate_transaction_fee we get rained down with tons of Pydantic warnings like:
/Users/ripio/ripio/fireblocks_sweeper/.venv/lib/python3.13/site-packages/fireblocks/api_client.py:327: UserWarning: Failed to deserialize response of type EstimatedTransactionFeeResponse: 6 validation errors for TransactionFee
gasPrice.float
Input should be a valid number [type=float_type, input_value='30.369', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/float_type
gasPrice.int
Input should be a valid integer [type=int_type, input_value='30.369', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/int_type
baseFee.float
Input should be a valid number [type=float_type, input_value='32.224120103', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/float_type
baseFee.int
Input should be a valid integer [type=int_type, input_value='32.224120103', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/int_type
priorityFee.float
Input should be a valid number [type=float_type, input_value='1', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/float_type
priorityFee.int
Input should be a valid integer [type=int_type, input_value='1', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/int_type
warnings.warn(
This also happens with the TransactionResponse model.
To Reproduce
Steps to reproduce the behavior:
Execute following snippet:
...
fb = Fireblocks(configuration)
tx = TransactionRequest(
operation=TransactionOperation.TRANSFER,
assetId="ETH_TEST5",
amount=TransactionRequestAmount("0.001"),
source=SourceTransferPeerPath(
type=TransferPeerPathType.VAULT_ACCOUNT,
id="412",
),
destination=DestinationTransferPeerPath(
type=TransferPeerPathType.VAULT_ACCOUNT,
id="411"
),
)
request = fb.transactions.estimate_transaction_fee(
transaction_request=tx
)
result = request.result()Expected behavior
No such warnings should appear
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
- Python Version: 3.13.2
- fireblocks-sdk version: 10.0.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working