mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-05 18:38:09 +01:00
Dynamic fee selection.
Display xmr offer fees. Display bid events. html create offer uses correct coin amount scales.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user