Beispiel #1
0
    def restore_device(self, label='', word_count=24):
        self.client.init_device()
        if not self.simulator:
            # Use interactive_get_pin
            self.client.ui.get_pin = MethodType(interactive_get_pin, self.client.ui)

        device.recover(self.client, word_count=word_count, label=label, input_callback=mnemonic_words(), passphrase_protection=bool(self.password))
        return {'success': True}
Beispiel #2
0
    def restore_device(self, label: str = "", word_count: int = 24) -> bool:
        self._prepare_device()
        if not self.simulator:
            # Use interactive_get_pin
            self.client.ui.get_pin = MethodType(interactive_get_pin, self.client.ui)

        device.recover(
            self.client,
            word_count=word_count,
            label=label,
            input_callback=mnemonic_words(),
            passphrase_protection=bool(self.password),
        )
        return True