Skip to content

Commit

Permalink
Rounding error bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
volbil authored Sep 15, 2020
1 parent 02c7c21 commit a217046
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def supply(height):
}

def satoshis(value):
return int(value * math.pow(10, 8))
return math.ceil(value * math.pow(10, 8))

def amount(value):
return round(value / math.pow(10, 8), 8)

2 comments on commit a217046

@decryp2kanon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@decryp2kanon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

image

cryptozeny, [15.09.20 09:34]
fixed?

Volbil, [15.09.20 09:35]
[ Photo ]
Because python int floor number by default

Please sign in to comment.