Skip to content

Commit

Permalink
info icon for linking accounts in TX Review
Browse files Browse the repository at this point in the history
  • Loading branch information
GhenadieVP committed Sep 9, 2024
1 parent e2645fc commit 0298311
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions RadixWallet/Core/DesignSystem/Components/WarningView.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// MARK: - WarningErrorView

public struct WarningErrorView: View {
public let text: String
public let type: ViewType
Expand Down Expand Up @@ -42,8 +41,10 @@ public struct WarningErrorView: View {
}

extension WarningErrorView {
static let transactionIntroducesNewAccount: Self = HStack(alignment: .center, spacing: .small1) {
WarningErrorView(text: L10n.TransactionReview.FeePayerValidation.linksNewAccount, type: .warning)
InfoButton(.payingaccount)
static func transactionIntroducesNewAccount() -> some View {
HStack(alignment: .center, spacing: .small1) {
WarningErrorView(text: L10n.TransactionReview.FeePayerValidation.linksNewAccount, type: .warning)
InfoButton(.payingaccount)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ extension CustomizeFees {
if viewState.insufficientBalance {
WarningErrorView(text: L10n.CustomizeNetworkFees.Warning.insufficientBalance, type: .error)
} else if viewState.linkingNewAccount {
WarningErrorView.transactionIntroducesNewAccount
WarningErrorView.transactionIntroducesNewAccount()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extension TransactionReviewNetworkFee {
case .insufficientBalance:
WarningErrorView(text: L10n.TransactionReview.FeePayerValidation.insufficientBalance, type: .error)
case .valid(.introducesNewAccount):
WarningErrorView.transactionIntroducesNewAccount
WarningErrorView.transactionIntroducesNewAccount()
case .valid:
EmptyView()
}
Expand Down

0 comments on commit 0298311

Please sign in to comment.