Fix type conversion for fiat and crypto amounts in LamassuTransactionProcessor: update processing logic to convert values to integers after converting to float, ensuring accurate handling of monetary values.
This commit is contained in:
parent
39741075b4
commit
3a03efde20
1 changed files with 1 additions and 1 deletions
|
|
@ -400,7 +400,7 @@ class LamassuTransactionProcessor:
|
|||
elif key in ['transaction_id', 'device_id', 'crypto_code', 'fiat_code']:
|
||||
processed_row[key] = str(value)
|
||||
elif key in ['fiat_amount', 'crypto_amount']:
|
||||
processed_row[key] = int(value) if value else 0
|
||||
processed_row[key] = int(float(value)) if value else 0
|
||||
elif key in ['commission_percentage', 'discount']:
|
||||
processed_row[key] = float(value) if value else 0.0
|
||||
elif key == 'transaction_time':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue