Skip to content

Commit 8940cd0

Browse files
bfoss765claude
andcommitted
fix: show provider-specific support contact for gift card errors
- Display "Contact PiggyCards Support" instead of "Contact CTX Support" when a PiggyCards purchase fails - Style the support link in blue to make it appear clickable - Clicking opens email to the correct provider's support address 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 70de58e commit 8940cd0

4 files changed

Lines changed: 11 additions & 7 deletions

File tree

DashWallet.xcodeproj/xcshareddata/xcschemes/dashwallet.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
buildConfiguration = "Debug">
121121
</AnalyzeAction>
122122
<ArchiveAction
123-
buildConfiguration = "Testflight"
123+
buildConfiguration = "Release"
124124
revealArchiveInOrganizer = "YES">
125125
</ArchiveAction>
126126
</Scheme>

DashWallet/Sources/UI/Explore Dash/Views/DashSpend/DashSpendPayScreen.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,10 @@ struct DashSpendPayScreen: View {
228228
positiveButtonAction: {
229229
showCustomErrorDialog = false
230230
},
231-
negativeButtonText: NSLocalizedString("Contact CTX Support", comment: "DashSpend"),
231+
negativeButtonText: viewModel.contactSupportButtonText,
232232
negativeButtonAction: {
233233
showCustomErrorDialog = false
234-
viewModel.contactCTXSupport()
234+
viewModel.contactSupport()
235235
}
236236
)
237237
.frame(maxWidth: .infinity, maxHeight: .infinity)

DashWallet/Sources/UI/Explore Dash/Views/DashSpend/DashSpendPayViewModel.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,12 @@ class DashSpendPayViewModel: NSObject, ObservableObject, NetworkReachabilityHand
278278

279279
return transaction.txHashData
280280
}
281-
282-
func contactCTXSupport() {
281+
282+
var contactSupportButtonText: String {
283+
String(format: NSLocalizedString("Contact %@ Support", comment: "DashSpend"), provider.displayName)
284+
}
285+
286+
func contactSupport() {
283287
let subject = "\(provider.displayName) Issue: Spending Limit Problem"
284288

285289
var body = "Merchant details\n"

DashWallet/Sources/UI/SwiftUI Components/ButtonsGroup.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ struct ButtonsGroup: View {
6868
.overrideBackgroundColor(style == .regular ? .dashBlue : .buttonRed)
6969
.overrideForegroundColor(negativeButtonText == nil ? .dashBlue : .white)
7070
negativeButton
71-
.overrideForegroundColor(positiveButtonText == nil ? .dashBlue : .primaryText)
71+
.overrideForegroundColor(.dashBlue)
7272
}
7373
} else {
7474
HStack(spacing: 6) {
7575
negativeButton
7676
.frame(maxWidth: .infinity)
77-
.overrideForegroundColor(positiveButtonText == nil ? .dashBlue : .primaryText)
77+
.overrideForegroundColor(.dashBlue)
7878
positiveButton
7979
.frame(maxWidth: .infinity)
8080
.overrideBackgroundColor(style == .regular ? .dashBlue : .buttonRed)

0 commit comments

Comments
 (0)