Dynamic fee selection.

Display xmr offer fees.
Display bid events.
html create offer uses correct coin amount scales.
This commit is contained in:
tecnovert
2020-12-08 20:23:00 +02:00
parent 2346858145
commit 3c4c2c528f
7 changed files with 93 additions and 23 deletions

View File

@@ -200,6 +200,9 @@ class Test(unittest.TestCase):
assert('100.00000000' == format_amount(amount_from, scale_from))
assert('10.000000000000' == format_amount(amount_to, scale_to))
rate_check = int((amount_to / amount_from) * (10 ** scale_from))
assert(rate == rate_check)
scale_from = 12
scale_to = 8
amount_from = 1 * (10 ** scale_from)
@@ -209,6 +212,9 @@ class Test(unittest.TestCase):
assert('1.000000000000' == format_amount(amount_from, scale_from))
assert('12.00000000' == format_amount(amount_to, scale_to))
rate_check = int((amount_to / amount_from) * (10 ** scale_from))
assert(rate == rate_check)
if __name__ == '__main__':
unittest.main()