def set_content(self, addr, label, amount, currency):
        self.address = addr
        address_text = addr % "<span style='font-size: 18pt'>%s</span>" if addr else ""
        self.address_label.setText(address_text)

        if currency == 'BTC': currency = None
        amount_text = ''
        if amount:
            if currency:
                try:
                    self.amount = Decimal(amount) / self.exchanger.exchange(1, currency) if currency else amount
                except Exception:
                    self.amount = None
            else:
                self.amount = Decimal(amount)
            self.amount = self.amount.quantize(Decimal('1.0000'))

            if currency:
                amount_text += "<span style='font-size: 18pt'>%s %s</span><br/>" % (amount, currency)
            amount_text += "<span style='font-size: 21pt'>%s</span> <span style='font-size: 16pt'>BTC</span> " % str(self.amount) 
        else:
            self.amount = None
            
        self.amount_label.setText(amount_text)

        self.label = label
        label_text = "<span style='font-size: 21pt'>%s</span>" % label if label else ""
        self.label_label.setText(label_text)

        msg = 'bitcoin:'+self.address
        if self.amount is not None:
            msg += '?amount=%s'%(str( self.amount))
            if self.label is not None:
                encoded_label = quote(self.label)
                msg += '&label=%s'%(encoded_label)
        elif self.label is not None:
            encoded_label = quote(self.label)
            msg += '?label=%s'%(encoded_label)
            
        self.qrw.set_addr( msg )
dataset/ETHPy150Open bitxbay/BitXBay/electru/build/lib/electrum_plugins/pointofsale.py/QR_Window.set_content/swapped operands of `%`