示例#1
0
 def callback_PinMatrixRequest(self, msg):
     if msg.type == 1:
         desc = 'current PIN'
     elif msg.type == 2:
         desc = 'new PIN'
     elif msg.type == 3:
         desc = 'new PIN again'
     else:
         desc = 'PIN'
     pin = self.handler.get_pin("Please enter Trezor %s" % desc)
     if not pin:
         return proto.Cancel()
     return proto.PinMatrixAck(pin=pin)
示例#2
0
    def callback_PinMatrixRequest(self, msg):
        if msg.type == 1:
            desc = 'old PIN'
        elif msg.type == 2:
            desc = 'new PIN'
        elif msg.type == 3:
            desc = 'new PIN again'
        else:
            desc = 'PIN'

        pin = self.pin_dialog(msg="Please enter Trezor %s" % desc)
        if not pin:
            return proto.Cancel()
        return proto.PinMatrixAck(pin=pin)