Avoid ignoring the case precision amount = 0

This commit is contained in:
kokimame 2022-04-15 00:35:11 +09:00
parent b1a6db8d29
commit d23d830346

View File

@ -651,7 +651,7 @@ class Exchange:
Re-implementation of ccxt internal methods - ensuring we can test the result is correct
based on our definitions.
"""
if self.markets[pair]['precision']['amount']:
if self.markets[pair]['precision']['amount'] is not None:
amount = float(decimal_to_precision(amount, rounding_mode=TRUNCATE,
precision=self.markets[pair]['precision']['amount'],
counting_mode=self.precisionMode,