@@ -24,54 +24,65 @@ struct SeedView: View {
2424 let publicDescriptor = viewModel. publicDescriptor,
2525 let publicChangeDescriptor = viewModel. publicChangeDescriptor
2626 {
27+ if backupInfo. mnemonic. isEmpty {
28+ Text ( backupInfo. descriptor)
29+ . font ( . system( . caption, design: . monospaced) )
30+ . lineLimit ( 1 )
31+ . truncationMode ( . middle)
32+ . padding ( )
33+ } else {
34+ SeedPhraseView (
35+ words: backupInfo. mnemonic. components ( separatedBy: " " ) ,
36+ preferredWordsPerRow: 2 ,
37+ usePaging: true ,
38+ wordsPerPage: 4
39+ )
40+ }
2741
28- SeedPhraseView (
29- words: backupInfo. mnemonic. components ( separatedBy: " " ) ,
30- preferredWordsPerRow: 2 ,
31- usePaging: true ,
32- wordsPerPage: 4
33- )
34-
35- VStack {
36- Text ( " Seed is not synced across devices. " )
37- Text ( " Please make sure to write it down and store it securely. " )
42+ if !backupInfo. mnemonic. isEmpty {
43+ VStack {
44+ Text ( " Seed is not synced across devices. " )
45+ Text ( " Please make sure to write it down and store it securely. " )
46+ }
47+ . font ( . caption)
48+ . foregroundStyle ( . secondary)
49+ . multilineTextAlignment ( . center)
50+ . padding ( )
3851 }
39- . font ( . caption)
40- . foregroundStyle ( . secondary)
41- . multilineTextAlignment ( . center)
42- . padding ( )
4352
44- HStack {
45- Spacer ( )
46- Button {
47- UIPasteboard . general. string = backupInfo. mnemonic
48- isCopied = true
49- showCheckmark = true
50- DispatchQueue . main. asyncAfter ( deadline: . now( ) + 0.75 ) {
51- isCopied = false
52- showCheckmark = false
53+ if !backupInfo. mnemonic. isEmpty {
54+ HStack {
55+ Spacer ( )
56+ Button {
57+ UIPasteboard . general. string = backupInfo. mnemonic
58+ isCopied = true
59+ showCheckmark = true
60+ DispatchQueue . main. asyncAfter ( deadline: . now( ) + 0.75 ) {
61+ isCopied = false
62+ showCheckmark = false
63+ }
64+ } label: {
65+ HStack {
66+ Image (
67+ systemName: showCheckmark
68+ ? " document.on.document.fill " : " document.on.document "
69+ )
70+ . contentTransition ( . symbolEffect( . replace) )
71+ Text ( " Seed " )
72+ . bold ( )
73+ }
5374 }
54- } label: {
55- HStack {
56- Image (
57- systemName: showCheckmark
58- ? " document.on.document.fill " : " document.on.document "
75+ . buttonStyle (
76+ BitcoinFilled (
77+ width: 120 ,
78+ height: 40 ,
79+ tintColor: . primary,
80+ textColor: Color ( uiColor: . systemBackground) ,
81+ isCapsule: true
5982 )
60- . contentTransition ( . symbolEffect( . replace) )
61- Text ( " Seed " )
62- . bold ( )
63- }
64- }
65- . buttonStyle (
66- BitcoinFilled (
67- width: 120 ,
68- height: 40 ,
69- tintColor: . primary,
70- textColor: Color ( uiColor: . systemBackground) ,
71- isCapsule: true
7283 )
73- )
74- Spacer ( )
84+ Spacer ( )
85+ }
7586 }
7687
7788 HStack {
0 commit comments