addr.py,rpc.py,tw.py: minor changes
This commit is contained in:
parent
50e2e9b486
commit
290d3d557d
3 changed files with 6 additions and 6 deletions
|
|
@ -862,11 +862,11 @@ re-import your addresses.
|
|||
""".strip().format(pnm=pnm)
|
||||
}
|
||||
|
||||
def __new__(cls,source=None):
|
||||
def __new__(cls,*args,**kwargs):
|
||||
if g.coin == 'ETH':
|
||||
from mmgen.altcoins.eth.tw import EthereumAddrData
|
||||
cls = EthereumAddrData
|
||||
return MMGenObject.__new__(cls,source)
|
||||
return MMGenObject.__new__(cls,*args,**kwargs)
|
||||
|
||||
def __init__(self,source=None):
|
||||
self.al_ids = {}
|
||||
|
|
|
|||
|
|
@ -107,10 +107,10 @@ class CoinDaemonRPCConnection(object):
|
|||
dmsg_rpc(' RPC POST data ==> {}\n'.format(p))
|
||||
|
||||
class MyJSONEncoder(json.JSONEncoder):
|
||||
def default(self, obj):
|
||||
def default(self,obj):
|
||||
if isinstance(obj,g.proto.coin_amt):
|
||||
return g.proto.get_rpc_coin_amt_type()(obj)
|
||||
return json.JSONEncoder.default(self, obj)
|
||||
return json.JSONEncoder.default(self,obj)
|
||||
|
||||
http_hdr = { 'Content-Type': 'application/json' }
|
||||
if self.auth_str:
|
||||
|
|
|
|||
|
|
@ -383,11 +383,11 @@ Display options: show [D]ays, [g]roup, show [m]mgen addr, r[e]draw screen
|
|||
|
||||
class TwAddrList(MMGenDict):
|
||||
|
||||
def __new__(cls,usr_addr_list,minconf,showempty,showbtcaddrs,all_labels):
|
||||
def __new__(cls,*args,**kwargs):
|
||||
if g.coin == 'ETH':
|
||||
from mmgen.altcoins.eth.tw import EthereumTwAddrList
|
||||
cls = EthereumTwAddrList
|
||||
return MMGenDict.__new__(cls,usr_addr_list,minconf,showempty,showbtcaddrs,all_labels)
|
||||
return MMGenDict.__new__(cls,*args,**kwargs)
|
||||
|
||||
def __init__(self,usr_addr_list,minconf,showempty,showbtcaddrs,all_labels):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue