@@ -209,18 +209,19 @@ def run(self):
209
209
210
210
211
211
class SeedMnemonicEntryView (View ):
212
- def __init__ (self , cur_word_index : int = 0 , is_calc_final_word : bool = False ):
212
+ def __init__ (self , cur_word_index : int = 0 , is_calc_final_word : bool = False , seed_type : str = Seed . TYPE__BIP39 ):
213
213
super ().__init__ ()
214
214
self .cur_word_index = cur_word_index
215
215
self .cur_word = self .controller .storage .get_pending_mnemonic_word (cur_word_index )
216
216
self .is_calc_final_word = is_calc_final_word
217
+ self .seed_type = seed_type
217
218
218
219
219
220
def run (self ):
220
221
is_final_word = (
221
222
self .cur_word_index == self .controller .storage .pending_mnemonic_length - 1 and
222
223
not self .is_calc_final_word and
223
- self .settings . get_value ( SettingsConstants . SETTING__ELECTRUM_SEEDS ) == SettingsConstants . OPTION__DISABLED
224
+ self .seed_type == Seed . TYPE__BIP39
224
225
)
225
226
226
227
partial_mnemonic = None
@@ -264,7 +265,8 @@ def run(self):
264
265
SeedMnemonicEntryView ,
265
266
view_args = {
266
267
"cur_word_index" : self .cur_word_index + 1 ,
267
- "is_calc_final_word" : self .is_calc_final_word
268
+ "is_calc_final_word" : self .is_calc_final_word ,
269
+ "seed_type" : self .seed_type
268
270
}
269
271
)
270
272
else :
@@ -299,7 +301,8 @@ def run(self):
299
301
)
300
302
301
303
if button_data [selected_menu_num ] == self .EDIT :
302
- return Destination (SeedMnemonicEntryView , view_args = {"cur_word_index" : 0 })
304
+ seed_type = Seed .TYPE__ELECTRUM if self .controller .storage ._pending_is_electrum else Seed .TYPE__BIP39
305
+ return Destination (SeedMnemonicEntryView , view_args = {"cur_word_index" : 0 , "seed_type" : seed_type })
303
306
304
307
elif button_data [selected_menu_num ] == self .DISCARD :
305
308
self .controller .storage .discard_pending_mnemonic ()
@@ -526,7 +529,7 @@ def run(self):
526
529
527
530
self .controller .storage .init_pending_mnemonic (num_words = 12 , is_electrum = True )
528
531
529
- return Destination (SeedMnemonicEntryView )
532
+ return Destination (SeedMnemonicEntryView , view_args = { "seed_type" : Seed . TYPE__ELECTRUM } )
530
533
531
534
532
535
0 commit comments