Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions BDKSwiftExampleWallet/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
}
}
}
},
"(Optional) Import 12 Word Seed Phrase" : {

},
"/" : {
"localizations" : {
Expand Down Expand Up @@ -180,6 +183,7 @@
}
},
"12 Word Seed Phrase (Optional)" : {
"extractionState" : "stale",
"localizations" : {
"fr" : {
"stringUnit" : {
Expand All @@ -190,6 +194,7 @@
}
},
"A bitcoin wallet powered by Bitcoin Dev Kit" : {
"extractionState" : "stale",
"localizations" : {
"fr" : {
"stringUnit" : {
Expand Down Expand Up @@ -240,6 +245,7 @@
}
},
"BDK Wallet" : {
"extractionState" : "stale",
"localizations" : {
"fr" : {
"stringUnit" : {
Expand Down Expand Up @@ -509,6 +515,9 @@
}
}
}
},
"powered by Bitcoin Dev Kit" : {

},
"Receive" : {
"localizations" : {
Expand Down
111 changes: 61 additions & 50 deletions BDKSwiftExampleWallet/View/OnboardingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,65 +25,70 @@ struct OnboardingView: View {
Spacer()

VStack(spacing: 25) {
Image(systemName: "bitcoinsign.circle.fill")
Image(systemName: "bitcoinsign.circle")
.resizable()
.foregroundColor(.bitcoinOrange)
.foregroundStyle(
.secondary
)
.frame(width: 100, height: 100, alignment: .center)
Text("BDK Wallet")
.textStyle(BitcoinTitle1())
.multilineTextAlignment(.center)
.padding(EdgeInsets(top: 0, leading: 12, bottom: 0, trailing: 12))
Text("A bitcoin wallet powered by Bitcoin Dev Kit")
.textStyle(BitcoinBody5())
Text("powered by Bitcoin Dev Kit")
.foregroundStyle(
LinearGradient(
gradient: Gradient(
colors: [
.secondary,
.primary,
]
),
startPoint: .topLeading,
endPoint: .bottomTrailing
)
)
.fontWidth(.expanded)
.foregroundColor(.secondary)
.fontWeight(.medium)
.multilineTextAlignment(.center)
.padding()
}

VStack {

VStack {
Picker(
"Network",
selection: $viewModel.selectedNetwork
) {
Text("Signet").tag(Network.signet)
Text("Testnet").tag(Network.testnet)
Text("Regtest").tag(Network.regtest)
}
.pickerStyle(.automatic)
.tint(viewModel.buttonColor)

Picker(
"Esplora Server",
selection: $viewModel.selectedURL
) {
ForEach(viewModel.availableURLs, id: \.self) { url in
Text(
url.replacingOccurrences(
of: "https://",
with: ""
).replacingOccurrences(
of: "http://",
with: ""
)
)
.tag(url)
}
}
.pickerStyle(.automatic)
.tint(viewModel.buttonColor)

Picker(
"Network",
selection: $viewModel.selectedNetwork
) {
Text("Signet").tag(Network.signet)
Text("Testnet").tag(Network.testnet)
Text("Regtest").tag(Network.regtest)
}
.pickerStyle(.automatic)
.tint(.primary)

Picker(
"Esplora Server",
selection: $viewModel.selectedURL
) {
ForEach(viewModel.availableURLs, id: \.self) { url in
Text(
url.replacingOccurrences(
of: "https://",
with: ""
).replacingOccurrences(
of: "http://",
with: ""
)
)
.tag(url)
}

}
.padding()
.pickerStyle(.automatic)
.tint(.primary)

VStack {
TextField("12 Word Seed Phrase (Optional)", text: $viewModel.words)
.submitLabel(.done)
.textFieldStyle(RoundedBorderTextFieldStyle())
.padding(.horizontal, 40)
TextField(
"(Optional) Import 12 Word Seed Phrase",
text: $viewModel.words
)
.submitLabel(.done)
.textFieldStyle(RoundedBorderTextFieldStyle())
.padding(.horizontal, 40)
if viewModel.wordArray != [] {
SeedPhraseView(
words: viewModel.wordArray,
Expand All @@ -92,6 +97,7 @@ struct OnboardingView: View {
wordsPerPage: 4
)
.frame(height: 200)
} else {
}
}
.padding(.top, 30)
Expand All @@ -101,7 +107,12 @@ struct OnboardingView: View {
Button("Create Wallet") {
viewModel.createWallet()
}
.buttonStyle(BitcoinFilled(tintColor: .bitcoinOrange, isCapsule: true))
.buttonStyle(
BitcoinFilled(
tintColor: .bitcoinOrange,
isCapsule: true
)
)
.padding()

}
Expand Down
2 changes: 1 addition & 1 deletion BDKSwiftExampleWallet/View/Send/FeeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct FeeView: View {
.tag(3)
}
.pickerStyle(.automatic)
.tint(.bitcoinOrange)
.tint(.primary)
Text("sat/vb")
.foregroundColor(.secondary)
.fontWeight(.thin)
Expand Down
12 changes: 9 additions & 3 deletions BDKSwiftExampleWallet/View/Settings/SeedView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct SeedView: View {

SeedPhraseView(
words: seed.mnemonic.components(separatedBy: " "),
preferredWordsPerRow: 3,
preferredWordsPerRow: 2,
usePaging: true,
wordsPerPage: 6
)
Expand All @@ -45,8 +45,14 @@ struct SeedView: View {
.bold()
}
}
.buttonStyle(.borderedProminent)
.tint(.bitcoinOrange)
.buttonStyle(
BitcoinFilled(
width: 120,
height: 40,
tintColor: .bitcoinOrange,
isCapsule: true
)
)
Spacer()
}
.padding()
Expand Down
Loading