Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ struct CurrencyInfoErrorView: View {

Spacer()

CodeButton(style: .filled, title: "OK") {
Button("OK") {
onAction()
}
.buttonStyle(.filled)
.padding(20)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,10 @@ struct CurrencyInfoScreen: View {
// Floating Footer
if !isUSDF {
CurrencyInfoFooter {
CodeButton(style: .filled, title: "Buy") {
Button("Buy") {
isShowingFundingSelection = true
}
.buttonStyle(.filled)

if balance.quarks > 0 {
CodeButton(style: .filledSecondary, title: "Sell") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,25 @@ struct FundingSelectionSheet: View {
.padding(.vertical, 20)

if let reserveBalance, reserveBalance.hasDisplayableValue() {
CodeButton(style: .filled, title: "USD Reserves (\(reserveBalance.converted.formatted()))") {
Button("USD Reserves (\(reserveBalance.converted.formatted()))") {
onSelectReserves()
}
.buttonStyle(.filled)
}

CodeButton(style: .filledCustom(Image.asset(.phantom), "Phantom"), title: "Solana USDC With") {
Button {
onSelectPhantom()
} label: {
HStack(spacing: 4) {
Text("Solana USDC With")
Image.asset(.phantom)
.renderingMode(.template)
.resizable()
.frame(maxWidth: 20, maxHeight: 20)
Text("Phantom")
}
}
.buttonStyle(.filled)

CodeButton(style: .subtle, title: "Dismiss") {
onDismiss()
Expand Down
3 changes: 2 additions & 1 deletion Flipcash/Core/Screens/Main/ForceUpgradeScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ struct ForceUpgradeScreen: View {

Spacer()

CodeButton(style: .filled, title: "Update Now") {
Button("Update Now") {
URL.appStoreApplicationHome.openWithApplication()
}
.buttonStyle(.filled)
}
.multilineTextAlignment(.center)
.padding(20)
Expand Down
7 changes: 2 additions & 5 deletions Flipcash/Core/Screens/Main/Modals/ModalCashReceived.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,8 @@ public struct ModalCashReceived: View {
.foregroundStyle(Color.textSecondary)
}

CodeButton(
style: .filled,
title: actionTitle,
action: dismissAction
)
Button(actionTitle, action: dismissAction)
.buttonStyle(.filled)
.padding(.top, 10)
}
.padding(20)
Expand Down
3 changes: 2 additions & 1 deletion Flipcash/Core/Screens/Main/TransactionDetailsModal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,13 @@ struct TransactionDetailsModal: View {
}

if let cashLinkMetadata = activity.cancellableCashLinkMetadata {
CodeButton(style: .filled, title: "Cancel Send") {
Button("Cancel Send") {
isPresented = false
Task {
cancelAction(cashLinkMetadata)
}
}
.buttonStyle(.filled)
.padding(.top, 30)
}
}
Expand Down
6 changes: 2 additions & 4 deletions Flipcash/Core/Screens/Onboarding/AccessKeyHelpScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ struct AccessKeyHelpScreen: View {

Spacer()

CodeButton(
style: .filled,
title: "Open Photos"
) {
Button("Open Photos") {
if let url = URL(string: "photos-redirect://") {
UIApplication.shared.open(url)
}
}
.buttonStyle(.filled)
.padding(.horizontal, 20)
.padding(.bottom, 20)
}
Expand Down
6 changes: 2 additions & 4 deletions Flipcash/Core/Screens/Onboarding/PermissionScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,10 @@ struct PermissionScreen: View {
}
Spacer()
Group {
CodeButton(
style: .filled,
title: actionTitle
) {
Button(actionTitle) {
action()
}
.buttonStyle(.filled)
if let skipAction = skipAction {
CodeButton(
style: .subtle,
Expand Down
6 changes: 2 additions & 4 deletions Flipcash/Core/Screens/Onramp/OnrampSuccessScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,10 @@ struct OnrampSuccessScreen: View {
.multilineTextAlignment(.center)
.fixedSize(horizontal: false, vertical: true)

CodeButton(
style: .filled,
title: "OK"
) {
Button("OK") {
viewModel.navigateToRoot()
}
.buttonStyle(.filled)
}
}
.padding(.horizontal, 20)
Expand Down
6 changes: 2 additions & 4 deletions Flipcash/Core/Screens/Onramp/VerifyInfoScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,10 @@ struct VerifyInfoScreen: View {

Spacer()

CodeButton(
style: .filled,
title: "Next"
) {
Button("Next") {
viewModel.navigateToInitialVerification()
}
.buttonStyle(.filled)
}
.padding(.horizontal, 20)
.padding(.top, 20)
Expand Down