From da520231944c7f0b784133e18e789f2babbf1cb8 Mon Sep 17 00:00:00 2001 From: M1nd3r Date: Tue, 30 Jul 2024 12:44:50 +0200 Subject: [PATCH] feat(core): add check to derive_and_store_roots btc_only variant [no changelog] --- core/src/apps/common/seed.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/apps/common/seed.py b/core/src/apps/common/seed.py index 7a4c46c4b..46040d9f2 100644 --- a/core/src/apps/common/seed.py +++ b/core/src/apps/common/seed.py @@ -75,6 +75,9 @@ if utils.BITCOIN_ONLY: if msg.passphrase is not None and msg.on_device: raise DataError("Passphrase provided when it shouldn't be!") + if ctx.cache.is_set(APP_COMMON_SEED): + raise Exception("Seed is already set!") + from trezor import wire if not storage_device.is_initialized(): @@ -99,9 +102,6 @@ else: if not storage_device.is_initialized(): raise wire.NotInitialized("Device is not initialized") - if ctx.cache.is_set(APP_COMMON_SEED): - raise Exception("Seed is already set!") - if ctx.cache.is_set(APP_CARDANO_ICARUS_SECRET): raise Exception("Cardano icarus secret is already set!")