From e2462e6e4d04d60583449ce737aa66a9365d62ff Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Mon, 27 Jan 2025 16:01:53 +0000 Subject: [PATCH] proto/*/params.py: make `max_tx_fee` a float --- mmgen/proto/bch/params.py | 2 +- mmgen/proto/btc/params.py | 2 +- mmgen/proto/etc/params.py | 2 +- mmgen/proto/eth/params.py | 2 +- mmgen/proto/ltc/params.py | 2 +- mmgen/protocol.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mmgen/proto/bch/params.py b/mmgen/proto/bch/params.py index ab3d179f..7e47b17e 100755 --- a/mmgen/proto/bch/params.py +++ b/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 diff --git a/mmgen/proto/btc/params.py b/mmgen/proto/btc/params.py index 4668778a..9be6006c 100755 --- a/mmgen/proto/btc/params.py +++ b/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 = [ diff --git a/mmgen/proto/etc/params.py b/mmgen/proto/etc/params.py index 9d3d9282..dcea505c 100755 --- a/mmgen/proto/etc/params.py +++ b/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 diff --git a/mmgen/proto/eth/params.py b/mmgen/proto/eth/params.py index e4d27fd5..1646f5b2 100755 --- a/mmgen/proto/eth/params.py +++ b/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',) diff --git a/mmgen/proto/ltc/params.py b/mmgen/proto/ltc/params.py index 9470905f..2a78e0f2 100755 --- a/mmgen/proto/ltc/params.py +++ b/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' diff --git a/mmgen/protocol.py b/mmgen/protocol.py index 07fc731b..56ce90f1 100755 --- a/mmgen/protocol.py +++ b/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