CoinProtocol.Base: new has_usr_fee attribute
This commit is contained in:
parent
cd0538246a
commit
4ff6752475
3 changed files with 11 additions and 2 deletions
|
|
@ -119,8 +119,11 @@ FMT CODES:
|
|||
return fmt_list(self.cfg._autoset_opts['tx_proxy'].choices, fmt='fancy')
|
||||
|
||||
def rel_fee_desc(self):
|
||||
from ..tx import BaseTX
|
||||
return BaseTX(cfg=self.cfg, proto=self.proto).rel_fee_desc
|
||||
if self.proto.has_usr_fee:
|
||||
from ..tx import BaseTX
|
||||
return BaseTX(cfg=self.cfg, proto=self.proto).rel_fee_desc
|
||||
else:
|
||||
return ''
|
||||
|
||||
def gas_limit(self, target):
|
||||
return """
|
||||
|
|
@ -138,6 +141,10 @@ of a standard transaction). The default is ‘auto’.
|
|||
""" if target == 'swaptx' or self.proto.base_coin == 'ETH' else ''
|
||||
|
||||
def fee(self, all_coins=False):
|
||||
|
||||
if not self.proto.has_usr_fee:
|
||||
return ''
|
||||
|
||||
from ..tx import BaseTX
|
||||
text = """
|
||||
FEE SPECIFICATION
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ class mainnet(CoinProtocol.Secp256k1):
|
|||
sign_mode = 'standalone'
|
||||
rpc_type = 'remote'
|
||||
avg_bdi = 6 # TODO
|
||||
has_usr_fee = False
|
||||
address_reuse_ok = False
|
||||
|
||||
wif_ver_num = btc_mainnet.wif_ver_num
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ class CoinProtocol(MMGenObject):
|
|||
is_fork_of = None
|
||||
chain_names = None
|
||||
is_evm = False
|
||||
has_usr_fee = True
|
||||
rpc_type = 'local'
|
||||
networks = ('mainnet', 'testnet', 'regtest')
|
||||
decimal_prec = 28
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue