Exemple #1
0
 def make_unsigned_transaction(self, *args):
     tx = BIP32_Wallet.make_unsigned_transaction(self, *args)
     fee = self.extra_fee(tx)
     if fee:
         address = self.billing_info["billing_address"]
         tx.outputs.append(("address", address, fee))
     return tx
Exemple #2
0
 def make_unsigned_transaction(self, *args):
     tx = BIP32_Wallet.make_unsigned_transaction(self, *args)
     fee = self.extra_fee(tx)
     if fee:
         address = self.billing_info['billing_address']
         tx.outputs.append(('address', address, fee))
     return tx
Exemple #3
0
 def make_unsigned_transaction(self, coins, outputs, config,
                               fixed_fee=None, change_addr=None):
     tx = BIP32_Wallet.make_unsigned_transaction(
         self, coins, outputs, config, fixed_fee, change_addr)
     # Plain TX was good.  Now add trustedcoin fee.
     fee = self.extra_fee()
     if fee:
         address = self.billing_info['billing_address']
         outputs = outputs + [(TYPE_ADDRESS, address, fee)]
         try:
             return BIP32_Wallet.make_unsigned_transaction(
                 self, coins, outputs, config, fixed_fee, change_addr)
         except NotEnoughFunds:
             # trustedcoin won't charge if the total inputs is
             # lower than their fee
             if tx.input_value() >= fee:
                 raise
     return tx
 def make_unsigned_transaction(self, coins, outputs, config,
                               fixed_fee=None, change_addr=None):
     mk_tx = lambda o: BIP32_Wallet.make_unsigned_transaction(
         self, coins, o, config, fixed_fee, change_addr)
     fee = self.extra_fee()
     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
Exemple #5
0
 def make_unsigned_transaction(self, coins, outputs, config,
                               fixed_fee=None, change_addr=None):
     mk_tx = lambda o: BIP32_Wallet.make_unsigned_transaction(
         self, coins, o, config, fixed_fee, change_addr)
     fee = self.extra_fee()
     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