module rename: tw.common -> tw.view

This commit is contained in:
The MMGen Project 2022-11-12 13:34:40 +00:00
commit 5948bd4106
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
18 changed files with 20 additions and 20 deletions

View file

@ -73,7 +73,7 @@ class TwAddrData(AddrData,metaclass=AsyncInit):
async def __init__(self,proto,wallet=None):
from .rpc import rpc_init
from .tw.common import TwLabel
from .tw.view import TwLabel
from .globalvars import g
from .seed import SeedID
self.proto = proto

View file

@ -24,7 +24,7 @@ from collections import namedtuple
from .common import *
from .addrlist import AddrList,KeyAddrList
from .tw.common import TwLabel
from .tw.view import TwLabel
opts_data = {
'text': {

View file

@ -13,7 +13,7 @@ proto.btc.tw.addresses: Bitcoin base protocol tracking wallet address list class
"""
from ....tw.addresses import TwAddresses
from ....tw.common import TwLabel,get_obj
from ....tw.view import TwLabel,get_obj
from ....util import msg,msg_r
from ....addr import CoinAddr
from ....obj import NonNegativeInt

View file

@ -13,7 +13,7 @@ proto.btc.twbal: Bitcoin base protocol tracking wallet balance class
"""
from ....tw.bal import TwGetBalance
from ....tw.common import get_tw_label
from ....tw.view import get_tw_label
class BitcoinTwGetBalance(TwGetBalance):

View file

@ -15,7 +15,7 @@ proto.btc.tw.common: Bitcoin base protocol tracking wallet dependency classes
from ....addr import CoinAddr
from ....util import die,msg,rmsg
from ....obj import MMGenList
from ....tw.common import get_tw_label
from ....tw.view import get_tw_label
class BitcoinTwCommon:

View file

@ -14,7 +14,7 @@ proto.btc.tw.json: export and import tracking wallet to JSON format
from collections import namedtuple
from ....tw.json import TwJSON
from ....tw.common import TwMMGenID
from ....tw.view import TwMMGenID
class BitcoinTwJSON(TwJSON):

View file

@ -15,7 +15,7 @@ proto.btc.tw.txhistory: Bitcoin base protocol tracking wallet transaction histor
from collections import namedtuple
from ....globalvars import g
from ....tw.txhistory import TwTxHistory
from ....tw.common import get_tw_label,TwMMGenID
from ....tw.view import get_tw_label,TwMMGenID
from ....addr import CoinAddr
from ....util import msg,msg_r
from ....color import nocolor,red,pink,gray

View file

@ -13,9 +13,9 @@ proto.eth.tw.common: Ethereum base protocol tracking wallet dependency classes
"""
from ....globalvars import g
from ....tw.ctl import TrackingWallet
from ....tw.common import TwView
from ....tw.view import TwView
from ....addr import CoinAddr
from ....tw.common import TwLabel
from ....tw.view import TwLabel
class EthereumTwCommon(TwView):

View file

@ -14,7 +14,7 @@ proto.eth.tw.json: export and import tracking wallet to JSON format
from collections import namedtuple
from ....tw.json import TwJSON
from ....tw.common import TwMMGenID
from ....tw.view import TwMMGenID
class EthereumTwJSON(TwJSON):

View file

@ -20,7 +20,7 @@
proto.eth.twuo: Ethereum tracking wallet unspent outputs class
"""
from ....tw.common import TwLabel
from ....tw.view import TwLabel
from ....tw.unspent import TwUnspentOutputs
from .common import EthereumTwCommon

View file

@ -21,7 +21,7 @@ tool/rpc.py: JSON/RPC routines for the 'mmgen-tool' utility
"""
from .common import tool_cmd_base,options_annot_str
from ..tw.common import TwView
from ..tw.view import TwView
from ..tw.txhistory import TwTxHistory
class tool_cmd(tool_cmd_base):

View file

@ -19,7 +19,7 @@ from ..obj import MMGenListItem,ImmutableAttr,ListItemAttr,TwComment,NonNegative
from ..rpc import rpc_init
from ..addr import CoinAddr,MMGenID
from ..color import red,green
from .common import TwView,TwMMGenID
from .view import TwView,TwMMGenID
class TwAddresses(MMGenObject,TwView,metaclass=AsyncInit):

View file

@ -36,7 +36,7 @@ from ..objmethods import MMGenObject
from ..obj import TwComment,get_obj
from ..addr import CoinAddr,is_mmgen_id,is_coin_addr
from ..rpc import rpc_init
from .common import TwMMGenID,TwLabel
from .view import TwMMGenID,TwLabel
addr_info = namedtuple('addr_info',['twmmid','coinaddr'])

View file

@ -19,7 +19,7 @@ from ..base_obj import AsyncInit
from ..objmethods import MMGenObject
from ..obj import CoinTxID,MMGenList,Int
from ..rpc import rpc_init
from .common import TwView
from .view import TwView
class TwTxHistory(MMGenObject,TwView,metaclass=AsyncInit):

View file

@ -35,7 +35,7 @@ from ..obj import (
NonNegativeInt )
from ..addr import CoinAddr,MMGenID
from ..rpc import rpc_init
from .common import TwView,TwMMGenID,get_tw_label
from .view import TwView,TwMMGenID,get_tw_label
class TwUnspentOutputs(MMGenObject,TwView,metaclass=AsyncInit):

View file

@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
tw: Tracking wallet dependency classes and helper functions
tw.view: base class for tracking wallet view classes
"""
import sys,time,asyncio
@ -30,7 +30,7 @@ from ..color import nocolor,yellow,green,red,blue
from ..util import msg,msg_r,fmt,die,capfirst,make_timestr
from ..addr import MMGenID
# mixin class for TwUnspentOutputs,TwAddresses,TwTxHistory:
# base class for TwUnspentOutputs,TwAddresses,TwTxHistory:
class TwView:
dates_set = False

View file

@ -38,7 +38,7 @@ from mmgen.seedsplit import *
from mmgen.addr import *
from mmgen.addrlist import *
from mmgen.addrdata import *
from mmgen.tw.common import *
from mmgen.tw.view import *
from mmgen.amt import *
from mmgen.key import *
from mmgen.rpc import IPPort

View file

@ -483,7 +483,7 @@ class TestSuiteMain(TestSuiteBase,TestSuiteShared):
cmd_args = self._make_txcreate_cmdline(tx_data)
if cmdline_inputs:
from mmgen.tw.common import TwLabel
from mmgen.tw.view import TwLabel
cmd_args = [
'--inputs={},{},{},{},{},{}'.format(
TwLabel(self.proto,dfake[0][self.lbl_id]).mmid,dfake[1]['address'],