def make_unsigned_transaction(self,
                                  coins,
                                  outputs,
                                  config,
                                  fixed_fee=None,
                                  change_addr=None):

        #print('#########excuted!!!!!!!!')
        mk_tx = lambda o: Multisig_Wallet.make_unsigned_transaction(
            self, coins, o, config, fixed_fee, change_addr)
        fee = self.extra_fee(config)
        if fee:
            address = self.billing_info['billing_address']
            fee_output = (TYPE_ADDRESS, address, fee)
            try:
                tx = mk_tx(outputs + [fee_output])
            except NotEnoughFunds:
                # trustedcoin won't charge if the total inputs is
                # lower than their fee
                tx = mk_tx(outputs)
                if tx.input_value() >= fee:
                    raise
                self.print_error("not charging for this tx")
        else:
            tx = mk_tx(outputs)
        return tx
 def sign_transaction(self, tx, password):
     Multisig_Wallet.sign_transaction(self, tx, password)
     if tx.is_complete():
         return
     if not self.auth_code:
         self.print_error("sign_transaction: no auth code")
         return
     long_user_id, short_id = self.get_user_id()
     tx_dict = tx.as_dict()
     raw_tx = tx_dict["hex"]
     r = server.sign(short_id, raw_tx, self.auth_code)
     if r:
         raw_tx = r.get('transaction')
         tx.update(raw_tx)
     self.print_error("twofactor: is complete", tx.is_complete())
     # reset billing_info
     self.billing_info = None