From e8ba1a7dfbae84d698c7ee6ec0c43a000b79ba42 Mon Sep 17 00:00:00 2001 From: Isaac Adewumi Date: Wed, 20 Sep 2023 18:26:59 +0100 Subject: [PATCH] chore: fix minor bugs in bg tasks --- backend/bridgebloc/apps/conversions/tasks.py | 2 +- backend/bridgebloc/services/circle.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/bridgebloc/apps/conversions/tasks.py b/backend/bridgebloc/apps/conversions/tasks.py index 3bb66ff..d6457a9 100644 --- a/backend/bridgebloc/apps/conversions/tasks.py +++ b/backend/bridgebloc/apps/conversions/tasks.py @@ -154,7 +154,7 @@ def send_to_recipient_using_circle_api() -> None: with transaction.atomic(): circle_client = get_circle_api_client(step.conversion.destination_chain) response = circle_client.make_withdrawal( - amount=f'{step.conversion.actual_amount:.2f}', + amount=step.conversion.actual_amount, master_wallet_id=settings.CIRCLE_MASTER_WALLET_ID, chain=step.conversion.destination_chain.to_circle(), destination_address=step.conversion.destination_address, diff --git a/backend/bridgebloc/services/circle.py b/backend/bridgebloc/services/circle.py index 5729f03..0a1ad4e 100644 --- a/backend/bridgebloc/services/circle.py +++ b/backend/bridgebloc/services/circle.py @@ -77,7 +77,7 @@ def make_withdrawal( 'address': to_checksum_address(destination_address), 'chain': chain, }, - 'amount': {'amount': str(amount), 'currency': 'USD'}, + 'amount': {'amount': f'{amount:.2f}', 'currency': 'USD'}, }, ) return response.json()