|
@@ -15,7 +15,7 @@ proto.btc.tx.new: Bitcoin new transaction class
|
|
|
from ....tx.new import New as TxNew
|
|
|
from ....obj import MMGenTxID
|
|
|
from ....util import msg, fmt, make_chksum_6, die, suf
|
|
|
-from ....color import pink, yellow
|
|
|
+from ....color import pink
|
|
|
from .base import Base
|
|
|
|
|
|
class New(Base, TxNew):
|
|
@@ -126,22 +126,9 @@ class New(Base, TxNew):
|
|
|
def final_inputs_ok_msg(self, funds_left):
|
|
|
return 'Transaction produces {} {} in change'.format(funds_left.hl(), self.coin)
|
|
|
|
|
|
- def check_chg_addr_is_wallet_addr(
|
|
|
- self,
|
|
|
- output = None,
|
|
|
- *,
|
|
|
- message = 'Change address is not an MMGen wallet address!'):
|
|
|
- def do_err():
|
|
|
- from ....ui import confirm_or_raise
|
|
|
- confirm_or_raise(
|
|
|
- cfg = self.cfg,
|
|
|
- message = yellow(message),
|
|
|
- action = 'Are you sure this is what you want?')
|
|
|
- if output:
|
|
|
- if not output.mmid:
|
|
|
- do_err()
|
|
|
- elif len(self.nondata_outputs) > 1 and not self.chg_output.mmid:
|
|
|
- do_err()
|
|
|
+ def check_chg_addr_is_wallet_addr(self):
|
|
|
+ if len(self.nondata_outputs) > 1 and not self.chg_output.mmid:
|
|
|
+ self._non_wallet_addr_confirm('Change address is not an MMGen wallet address!')
|
|
|
|
|
|
async def create_serialized(self, *, locktime=None):
|
|
|
|