diff --git a/mmgen/base_proto/bitcoin/tx/bump.py b/mmgen/base_proto/bitcoin/tx/bump.py index 79291773..87857418 100755 --- a/mmgen/base_proto/bitcoin/tx/bump.py +++ b/mmgen/base_proto/bitcoin/tx/bump.py @@ -15,6 +15,7 @@ base_proto.bitcoin.tx.bump: Bitcoin transaction bump class import mmgen.tx.bump as TxBase from .new import New from .completed import Completed +from ....util import msg class Bump(Completed,New,TxBase.Bump): desc = 'fee-bumped transaction' @@ -31,6 +32,8 @@ class Bump(Completed,New,TxBase.Bump): def convert_and_check_fee(self,tx_fee,desc): ret = super().convert_and_check_fee(tx_fee,desc) + if ret == False: + return ret if ret < self.min_fee: msg('{} {c}: {} fee too small. Minimum fee: {} {c} ({} {})'.format( ret.hl(), diff --git a/mmgen/base_proto/bitcoin/tx/new.py b/mmgen/base_proto/bitcoin/tx/new.py index d2a2df52..11f60f1d 100755 --- a/mmgen/base_proto/bitcoin/tx/new.py +++ b/mmgen/base_proto/bitcoin/tx/new.py @@ -16,7 +16,7 @@ import mmgen.tx.new as TxBase from .base import Base from ....opts import opt from ....obj import HexStr,MMGenTxID -from ....util import dmsg,vmsg,make_chksum_6,die +from ....util import msg,dmsg,vmsg,make_chksum_6,die class New(Base,TxBase.New): usr_fee_prompt = 'Enter transaction fee: ' diff --git a/mmgen/main_xmrwallet.py b/mmgen/main_xmrwallet.py index 4d7deb9b..b9593dc1 100755 --- a/mmgen/main_xmrwallet.py +++ b/mmgen/main_xmrwallet.py @@ -62,8 +62,9 @@ opts_data = { """, 'notes': """ -All operations require a running Monero daemon. Unless --daemon is specified, -the monerod is assumed to be listening on localhost at the default RPC port. +All operations except for ‘relay’ require a running Monero daemon. Unless +--daemon is specified, the monerod is assumed to be listening on localhost at +the default RPC port. If --tx-relay-daemon is specified, the monerod at HOST:PORT will be used to relay any created transactions. PROXY_HOST:PROXY_PORT, if specified, may @@ -79,8 +80,8 @@ create - create wallet for all or specified addresses in key-address file sync - sync wallet for all or specified addresses in key-address file list - same as 'sync', but also list detailed address info for accounts new - create a new account in a wallet, or a new address in an account -transfer - transfer specified XMR amount to specified address from specified - wallet:account +transfer - transfer specified XMR amount from specified wallet:account to + specified address sweep - sweep funds in specified wallet:account to new address in same account or new account in another wallet relay - relay a transaction from a transaction file created using 'sweep' diff --git a/mmgen/proto/xmr.py b/mmgen/proto/xmr.py index 916395e0..44f7948e 100755 --- a/mmgen/proto/xmr.py +++ b/mmgen/proto/xmr.py @@ -21,7 +21,7 @@ class mainnet(CoinProtocol.DummyWIF,CoinProtocol.Base): base_coin = 'XMR' base_proto = 'Monero' addr_ver_bytes = { '12': 'monero', '2a': 'monero_sub' } - addr_len = 68 + addr_len = 64 wif_ver_num = {} pubkey_types = ('monero',) mmtypes = ('M',) @@ -57,7 +57,7 @@ class mainnet(CoinProtocol.DummyWIF,CoinProtocol.Base): assert ret[-4:] == chk, f'{ret[-4:].hex()}: incorrect checksum. Correct value: {chk.hex()}' - return self.decode_addr_bytes(ret) + return self.decode_addr_bytes(ret[:-4]) def pubhash2addr(self,*args,**kwargs): raise NotImplementedError('Monero addresses do not support pubhash2addr()') diff --git a/mmgen/tx/completed.py b/mmgen/tx/completed.py index ec32aded..237c346e 100755 --- a/mmgen/tx/completed.py +++ b/mmgen/tx/completed.py @@ -40,7 +40,8 @@ class Completed(Base): self.check_correct_chain() if self.check_sigs() != self.signed: - die(1,'Transaction is {}signed!'.format('not' if self.signed else '')) + from ..util import die + die(1,'Transaction is {}signed!'.format('not ' if self.signed else '')) @property def info(self): diff --git a/mmgen/xmrwallet.py b/mmgen/xmrwallet.py index 58dccf89..b6fdf70d 100755 --- a/mmgen/xmrwallet.py +++ b/mmgen/xmrwallet.py @@ -126,7 +126,8 @@ class MoneroMMGenTX: red(f'#{d.dest.account_address}') ) ) - return fmt(""" + + fs = """ Transaction info [Seed ID: {}. Network: {}]: TxID: {} Type: {} @@ -134,7 +135,9 @@ class MoneroMMGenTX: Amt: {} XMR Fee: {} XMR Dest: {} - """,strip_char='\t',indent=indent).format( + """ + + return fmt(fs,strip_char='\t',indent=indent).format( d.seed_id.hl(), d.network.upper(), d.txid.hl(), blue(capfirst(d.op)), @@ -143,7 +146,7 @@ class MoneroMMGenTX: to_entry if d.dest else '', d.amount.hl(), d.fee.hl(), - d.dest_address.hl() + d.dest_address.hl(), ) def write(self,delete_metadata=False):