diff --git a/ucoinpy/documents/transaction.py b/ucoinpy/documents/transaction.py index 799b713b9c6f32d7d7809b888715dfdf9ccf6c5b..bc7f251d351995b2e1d752a158dea6a826395ca5 100644 --- a/ucoinpy/documents/transaction.py +++ b/ucoinpy/documents/transaction.py @@ -13,6 +13,9 @@ def reduce_base(amount, base): :return: tuple containing computed (amount, base) :rtype: tuple """ + if amount == 0: + return 0, 0 + next_amount = amount next_base = base while int(next_amount) == next_amount: @@ -20,7 +23,7 @@ def reduce_base(amount, base): base = next_base next_amount /= 10 next_base += 1 - return amount, base + return int(amount), int(base) class Transaction(Document):