Skip to content

Commit

Permalink
Run swift format
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenperera committed Dec 15, 2024
1 parent 0838794 commit 1318da4
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
24 changes: 12 additions & 12 deletions ios/Cove/Flows/SelectedWalletFlow/SecretWordsScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import SwiftUI

struct SecretWordsScreen: View {
@Environment(AppManager.self) private var app

let id: WalletId

// private
Expand All @@ -28,11 +28,11 @@ struct SecretWordsScreen: View {
var rows: [GridItem] {
Array(repeating: .init(.fixed(rowHeight)), count: numberOfRows)
}

var body: some View {
VStack {
Spacer()

Group {
if let words {
GroupBox {
Expand All @@ -45,15 +45,15 @@ struct SecretWordsScreen: View {
.fontDesign(.monospaced)
.multilineTextAlignment(.leading)
.minimumScaleFactor(0.5)

Text(word.word)
.fontWeight(.bold)
.fontDesign(.monospaced)
.multilineTextAlignment(.leading)
.minimumScaleFactor(0.75)
.lineLimit(1)
.fixedSize()

Spacer()
}
}
Expand All @@ -65,39 +65,39 @@ struct SecretWordsScreen: View {
} else {
Text(errorMessage ?? "Loading...")
}

Spacer()
Spacer()
Spacer()

VStack(spacing: 12) {
HStack {
Text("Recovery Words")
.font(.system(size: 36, weight: .semibold))
.foregroundColor(.white)
.multilineTextAlignment(.leading)

Spacer()
}

HStack {
Text("Your secret recovery words are the only way to recover your wallet if you lose your phone or switch to a different wallet. Whoever has you recovery words, controls your Bitcoin.")
.multilineTextAlignment(.leading)
.font(.footnote)
.foregroundStyle(.lightGray.opacity(0.75))
.fixedSize(horizontal: false, vertical: true)

Spacer()
}

HStack {
Text("Please save these words in a secure location.")
.font(.subheadline)
.multilineTextAlignment(.leading)
.fontWeight(.bold)
.foregroundStyle(.white)
.opacity(0.9)

Spacer()
}
}
Expand Down
20 changes: 10 additions & 10 deletions ios/Cove/Flows/SendFlow/SendFlowSetAmountScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ struct SendFlowSetAmountScreen: View {
AccountSection

if feeRateOptions != nil,
selectedFeeRate != nil,
Address.isValid(address)
selectedFeeRate != nil,
Address.isValid(address)
{
// Network Fee Section
NetworkFeeSection
Expand Down Expand Up @@ -443,8 +443,8 @@ struct SendFlowSetAmountScreen: View {

let value =
newValue
.replacingOccurrences(of: ",", with: "")
.removingLeadingZeros()
.replacingOccurrences(of: ",", with: "")
.removingLeadingZeros()

if presenter.focusField == .amount {
sendAmount = value
Expand All @@ -457,8 +457,8 @@ struct SendFlowSetAmountScreen: View {

let oldValueCleaned =
oldValue
.replacingOccurrences(of: ",", with: "")
.removingLeadingZeros()
.replacingOccurrences(of: ",", with: "")
.removingLeadingZeros()

if oldValueCleaned == value { return }

Expand Down Expand Up @@ -639,10 +639,10 @@ struct SendFlowSetAmountScreen: View {

guard
let feeRateOptions = try? await manager.rust
.feeRateOptionsWithTotalFee(
feeRateOptions: feeRateOptionsBase, amount: amount,
address: address
)
.feeRateOptionsWithTotalFee(
feeRateOptions: feeRateOptionsBase, amount: amount,
address: address
)
else { return }

await MainActor.run {
Expand Down
30 changes: 15 additions & 15 deletions ios/Cove/Views/LockView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,21 +120,21 @@ struct LockView<Content: View>: View {
.ignoresSafeArea()

switch (screen, lockType, isBiometricAvailable) {
case (_, .biometric, false):
PermissionsNeeded
case (_, .biometric, true):
BiometricView
case (.biometric, .both, true):
BiometricView
case (_, .pin, _):
numberPadPinView
case (.biometric, .both, false):
numberPadPinView
case (.pin, .both, _):
numberPadPinView
case (_, .none, _):
let _ = Log.error("inalid lock type none for screen")
EmptyView()
case (_, .biometric, false):
PermissionsNeeded
case (_, .biometric, true):
BiometricView
case (.biometric, .both, true):
BiometricView
case (_, .pin, _):
numberPadPinView
case (.biometric, .both, false):
numberPadPinView
case (.pin, .both, _):
numberPadPinView
case (_, .none, _):
let _ = Log.error("inalid lock type none for screen")
EmptyView()
}
}
.environment(\.colorScheme, .dark)
Expand Down

0 comments on commit 1318da4

Please sign in to comment.