Browse Source

proto/*/params.py: make `max_tx_fee` a float

The MMGen Project 1 month ago
parent
commit
e2462e6e4d

+ 1 - 1
mmgen/proto/bch/params.py

@@ -27,7 +27,7 @@ class mainnet(mainnet):
 	]
 	caps = ()
 	coin_amt        = 'BCHAmt'
-	max_tx_fee      = '0.1'
+	max_tx_fee      = 0.1
 	ignore_daemon_version = False
 	cashaddr_pfx    = 'bitcoincash'
 	cashaddr        = True

+ 1 - 1
mmgen/proto/btc/params.py

@@ -28,7 +28,7 @@ class mainnet(CoinProtocol.Secp256k1): # chainparams.cpp
 	mmtypes         = ('L', 'C', 'S', 'B')
 	dfl_mmtype      = 'L'
 	coin_amt        = 'BTCAmt'
-	max_tx_fee      = '0.003'
+	max_tx_fee      = 0.003
 	sighash_type    = 'ALL'
 	block0          = '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f'
 	forks           = [

+ 1 - 1
mmgen/proto/etc/params.py

@@ -16,7 +16,7 @@ from ..eth.params import mainnet
 
 class mainnet(mainnet):
 	chain_names = ['classic', 'ethereum_classic']
-	max_tx_fee  = '0.005'
+	max_tx_fee  = 0.005
 	coin_amt    = 'ETCAmt'
 	ignore_daemon_version = False
 

+ 1 - 1
mmgen/proto/eth/params.py

@@ -26,7 +26,7 @@ class mainnet(CoinProtocol.DummyWIF, CoinProtocol.Secp256k1):
 	pubkey_type   = 'std' # required by DummyWIF
 
 	coin_amt      = 'ETHAmt'
-	max_tx_fee    = '0.005'
+	max_tx_fee    = 0.005
 	chain_names   = ['ethereum', 'foundation']
 	sign_mode     = 'standalone'
 	caps          = ('token',)

+ 1 - 1
mmgen/proto/ltc/params.py

@@ -20,7 +20,7 @@ class mainnet(mainnet):
 	wif_ver_num     = {'std': 'b0'}
 	mmtypes         = ('L', 'C', 'S', 'B')
 	coin_amt        = 'LTCAmt'
-	max_tx_fee      = '0.3'
+	max_tx_fee      = 0.3
 	base_coin       = 'LTC'
 	forks           = []
 	bech32_hrp      = 'ltc'

+ 1 - 1
mmgen/protocol.py

@@ -110,7 +110,7 @@ class CoinProtocol(MMGenObject):
 				from . import amt
 				from decimal import getcontext
 				self.coin_amt = getattr(amt, self.coin_amt)
-				self.max_tx_fee = self.coin_amt(self.max_tx_fee) if hasattr(self, 'max_tx_fee') else None
+				self.max_tx_fee = self.coin_amt(str(self.max_tx_fee)) if hasattr(self, 'max_tx_fee') else None
 				getcontext().prec = self.decimal_prec
 			else:
 				self.coin_amt = None