Convert coinbase account amounts as floats to properly add them together (#137588)

Convert coinbase account amounts as floats to properly add
pull/138231/head
Nathan Spencer 2025-02-10 09:11:40 -07:00 committed by Franck Nijhof
parent efe7050030
commit 4bd1d0199b
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
1 changed files with 4 additions and 2 deletions

View File

@ -140,8 +140,10 @@ def get_accounts(client, version):
API_ACCOUNT_ID: account[API_V3_ACCOUNT_ID],
API_ACCOUNT_NAME: account[API_ACCOUNT_NAME],
API_ACCOUNT_CURRENCY: account[API_ACCOUNT_CURRENCY],
API_ACCOUNT_AMOUNT: account[API_ACCOUNT_AVALIABLE][API_ACCOUNT_VALUE]
+ account[API_ACCOUNT_HOLD][API_ACCOUNT_VALUE],
API_ACCOUNT_AMOUNT: (
float(account[API_ACCOUNT_AVALIABLE][API_ACCOUNT_VALUE])
+ float(account[API_ACCOUNT_HOLD][API_ACCOUNT_VALUE])
),
ACCOUNT_IS_VAULT: account[API_RESOURCE_TYPE] == API_V3_TYPE_VAULT,
}
for account in accounts