Merge pull request #3431 from kyuupichan/upstream

Make trezor code specific to trezor
This commit is contained in:
ThomasV 2017-12-02 13:00:58 +01:00 committed by GitHub
commit d878286a3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -183,11 +183,11 @@ class TrezorCompatiblePlugin(HW_PluginBase):
if method == TIM_NEW:
strength = 64 * (item + 2) # 128, 192 or 256
u2f_counter = 0
skip_backup = False
client.reset_device(True, strength, passphrase_protection,
pin_protection, label, language,
u2f_counter, skip_backup)
args = [True, strength, passphrase_protection,
pin_protection, label, language]
if self.device == 'TREZOR':
args.extend([0, False]) # u2f_counter, skip_backup
client.reset_device(*args)
elif method == TIM_RECOVER:
word_count = 6 * (item + 2) # 12, 18 or 24
client.step = 0