def __init__(self, parent: 'WalletDlg', masternode_list: List[MasternodeConfig], tx_explorer_url: str): ExtSortFilterItemModel.__init__(self, parent, [ TableModelColumn('satoshis', 'Amount (Dash)', True, 100), TableModelColumn('confirmations', 'Confirmations', True, 100), TableModelColumn('bip32_path', 'Path', True, 100), TableModelColumn('time_str', 'TX Date/Time', True, 140), TableModelColumn('address', 'Address', True, 140), TableModelColumn('masternode', 'Masternode', False, 40), TableModelColumn('txid', 'TX Hash', True, 220), TableModelColumn('output_index', 'TX Idx', True, 40) ], True, True) if DEBUG_MODE: self.insert_column(len(self._columns), TableModelColumn('id', 'DB id', True, 40)) self.tx_explorer_url = tx_explorer_url self.hide_collateral_utxos = True self.utxos: List[UtxoType] = [] self.utxo_by_id: Dict[int, UtxoType] = {} self.block_height = None self.dialog: 'WalletDlg' = parent self.mn_by_collateral_tx: Dict[str, MasternodeConfig] = {} self.mn_by_collateral_address: Dict[str, MasternodeConfig] = {} for mn in masternode_list: ident = mn.collateral_tx + '-' + str(mn.collateral_tx_index) self.mn_by_collateral_tx[ident] = mn self.mn_by_collateral_address[mn.collateral_address] = mn self.set_attr_protection()
def __init__(self, parent): ExtSortFilterItemModel.__init__(self, parent, [ TableModelColumn('address', 'Address', True, 100) ], False, True) self.accounts: List[Bip44AccountType] = [] self.__data_modified = False self.show_zero_balance_addresses = False self.show_not_used_addresses = False self.set_attr_protection()
def __init__(self, parent, masternode_list: List[MasternodeConfig], bip44_wallet: Bip44Wallet): ExtSortFilterItemModel.__init__(self, parent, [ TableModelColumn('description', 'Description', True, 100) ], False, False) self.mn_items: List[MnAddressItem] = [] for mn in masternode_list: mni = MnAddressItem() mni.masternode = mn if mni.masternode.collateral_address: self.mn_items.append(mni) self.load_mn_addresses_in_bip44_wallet(bip44_wallet)
def __init__(self, parent, masternode_list: List[MasternodeConfig], bip44_wallet: Bip44Wallet): ExtSortFilterTableModel.__init__( self, parent, [TableModelColumn('description', 'Description', True, 100)], False, False) self.mn_items: List[MnAddressItem] = [] for mn in masternode_list: mni = MnAddressItem() mni.masternode = mn if mni.masternode.collateralAddress: a = bip44_wallet.get_address_item( mni.masternode.collateralAddress, True) address_loc = Bip44AddressType(tree_id=None) address_loc.copy_from(a) if not address_loc.bip32_path: address_loc.bip32_path = mni.masternode.collateralBip32Path mni.address = address_loc self.mn_items.append(mni)
def __init__(self, parent, app_config: AppConfig, all_mns: bool): columns = [ TableModelColumn("ip_address", "IP Address", True, 100), TableModelColumn("protocol", "Protocol", True, 60), TableModelColumn("status", "Status", True, 100), TableModelColumn("activeseconds", "Active Time", True, 80), TableModelColumn("lastseen", "Last Seen", True, 80), TableModelColumn("payee_address", "Collateral Address", True, 120) ] if not all_mns: columns.insert(0, TableModelColumn("alias", "Name", True, 80)) ExtSortFilterTableModel.__init__(self, parent, columns, True, True) wnd_utils.WndUtils.__init__(self, None) self.port = str( dash_utils.get_chain_params(app_config.dash_network).P2P_PORT) self.all = all_mns self.dashd_intf = parent.dashd_intf self.mnlist = app_config.masternodes self.parent = parent self.set_attr_protection()
def __init__(self, parent, utxos: List[UtxoType], masternode_list: List[MasternodeConfig], tx_explorer_url: str): ExtSortFilterTableModel.__init__(self, parent, [ TableModelColumn('address', 'Wallet address', True, 100), TableModelColumn('bip32_path', 'Wallet path', True, 100), TableModelColumn('assigned_to_mn', 'Assigned to MN', True, 100), TableModelColumn('time_stamp', 'TX date/time', True, 80), TableModelColumn('confirmations', 'Confirmations', True, 80), TableModelColumn('txid', 'TX hash', True, 140), TableModelColumn('output_index', 'TX index', True, 30), ], True, True) self.utxos: List[UtxoType] = utxos self.mn_by_collateral_tx = {} self.mn_by_collateral_address = {} self.tx_explorer_url = tx_explorer_url for mn in masternode_list: ident = mn.collateralTx + '-' + str(mn.collateralTxIndex) self.mn_by_collateral_tx[ident] = mn self.mn_by_collateral_address[mn.collateralAddress] = mn self.set_attr_protection()
def __init__(self, parent, tx_explorer_url: str): ExtSortFilterItemModel.__init__(self, parent, [ TableModelColumn('direction', 'Direction', True, 50), TableModelColumn('satoshis', 'Amount', True, 100), TableModelColumn('block_time_str', 'Date', True, 100), TableModelColumn('block_height', 'Height', True, 100), TableModelColumn('confirmations', 'Confirmations', True, 100), TableModelColumn('senders', 'Sender', True, 100), TableModelColumn('recipient', 'Recipient', True, 100), TableModelColumn('tx_hash', 'TX Hash', False, 100), TableModelColumn('is_coinbase', 'Coinbase TX', True, 100), TableModelColumn('label', 'Comment', True, 100) ], True, True) if DEBUG_MODE: self.insert_column(len(self._columns), TableModelColumn('id', 'DB id', True, 40)) self.txes: List[TxType] = [] self.txes_by_id: Dict[int, TxType] = {} self.tx_explorer_url = tx_explorer_url self.__current_block_height = None self.__data_modified = False self.dialog: 'WalletDlg' = parent # filter: self.filter_type = FILTER_OR self.filter_incoming = False self.filter_outgoing = False self.filter_coinbase = False self.filter_recipient = None self.filter_sender = None self.filter_amount_oper = None self.filter_amount_value = None # in satoshis self.filter_date_oper = None self.filter_date_value = None