Browse Source

Thornode:format_quote(): simplify call signature

The MMGen Project 6 months ago
parent
commit
5864bb83a3
2 changed files with 3 additions and 3 deletions
  1. 2 2
      mmgen/swap/proto/thorchain/thornode.py
  2. 1 1
      mmgen/tx/new_swap.py

+ 2 - 2
mmgen/swap/proto/thorchain/thornode.py

@@ -101,7 +101,7 @@ class Thornode:
 				self.tx.recv_asset.full_name,
 				self.in_amt.to_unit('satoshi'))
 
-	async def format_quote(self, trade_limit, usr_trade_limit, *, deduct_est_fee=False):
+	async def format_quote(self, trade_limit, *, deduct_est_fee=False):
 		from ....util import make_timestr, ymsg
 		from ....util2 import format_elapsed_hr
 		from ....color import blue, green, cyan, pink, orange, redbg, yelbg, grnbg
@@ -119,7 +119,7 @@ class Thornode:
 			from . import ExpInt4
 			tl_int = ExpInt4(trade_limit.to_unit('satoshi'))
 			tl_uniamt = UniAmt(tl_int.trunc, from_unit='satoshi')
-			ratio = usr_trade_limit if type(usr_trade_limit) is float else float(tl_uniamt / out_amt)
+			ratio = float(tl_uniamt / out_amt)
 			direction = 'ABOVE' if ratio > 1 else 'below'
 			mcolor, lblcolor = (
 				(redbg, redbg) if (ratio < 0.93 or ratio > 0.999) else

+ 1 - 1
mmgen/tx/new_swap.py

@@ -203,7 +203,7 @@ class NewSwap(New):
 			self.swap_quote_refresh_time = time.time()
 			await self.set_gas(to_addr=c.router if self.is_token else None)
 			trade_limit = get_trade_limit()
-			msg(await c.format_quote(trade_limit, self.usr_trade_limit, deduct_est_fee=deduct_est_fee))
+			msg(await c.format_quote(trade_limit, deduct_est_fee=deduct_est_fee))
 			ch = get_char('Press ‘r’ to refresh quote, any other key to continue: ')
 			msg('')
 			if ch not in 'Rr':