Exemplo n.º 1
0
 def parse_address_and_amount(self, line) -> PartialTxOutput:
     try:
         x, y = line.split(',')
     except ValueError:
         raise Exception(
             "expected two comma-separated values: (address, amount)"
         ) from None
     scriptpubkey = self.parse_output(x)
     amount = self.parse_amount(y)
     return PartialTxOutput(scriptpubkey=scriptpubkey, value=amount)
Exemplo n.º 2
0
    def get_outputs(self, is_max):
        if self.payto_scriptpubkey:
            if is_max:
                amount = '!'
            else:
                amount = self.amount_edit.get_amount()
            self.outputs = [
                PartialTxOutput(scriptpubkey=self.payto_scriptpubkey,
                                value=amount)
            ]

        return self.outputs[:]
Exemplo n.º 3
0
 def parse_address_and_amount(self, line) -> PartialTxOutput:
     x, y = line.split(',')
     scriptpubkey = self.parse_output(x)
     amount = self.parse_amount(y)
     return PartialTxOutput(scriptpubkey=scriptpubkey, value=amount)