Skip to content

Commit

Permalink
1.9.0 small bug fixes (#1317)
Browse files Browse the repository at this point in the history
  • Loading branch information
GhenadieVP authored Sep 6, 2024
1 parent 15f887a commit 1a5e1f2
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 41 deletions.
1 change: 1 addition & 0 deletions RadixWallet/Core/DesignSystem/Components/InfoButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public struct InfoButton: View {
}
}
.buttonStyle(.info)
.foregroundColor(label != nil ? .app.blue2 : .app.gray3)
}

private func showInfo() {
Expand Down
1 change: 0 additions & 1 deletion RadixWallet/Core/DesignSystem/Styles/InfoButtonStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public struct InfoButtonStyle: ButtonStyle {
Image(.info)
}
.labelStyle(.titleAndIcon)
.foregroundColor(.app.blue2)
.opacity(configuration.isPressed ? 0.2 : 1)
}
}
8 changes: 1 addition & 7 deletions RadixWallet/Core/SharedModels/Assets/OnLedgerEntity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -674,12 +674,6 @@ extension OnLedgerEntity.Resource {

extension OnLedgerEntity.Resource {
public var fungibleResourceName: String? {
metadata.fungibleResourceName
}
}

extension OnLedgerEntity.Metadata {
public var fungibleResourceName: String? {
name ?? symbol
metadata.title
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ private extension ResourceViewState {

var rowCoreViewState: PlainListRowCore.ViewState {
.init(
title: name ?? "-",
title: name,
subtitle: address.resourceAddress.formatted()
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ extension InfoLinkSheet {
Text(text)
.textStyle(.body1Regular)
.foregroundColor(.app.gray1)
.tint(.app.blue2)
.multilineTextAlignment(.leading)
.flushedLeft
.padding(.bottom, .small3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extension ResourceBalance.ViewState.PoolUnit {
resourcePoolAddress: poolUnit.resourcePoolAddress,
poolUnitAddress: poolUnit.resource.resourceAddress,
poolIcon: poolUnit.resource.metadata.iconURL,
poolName: poolUnit.resource.metadata.fungibleResourceName,
poolName: poolUnit.resource.metadata.title,
amount: nil,
dAppName: details.dAppName,
resources: details.map { .init(resources: $0) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ extension ResourceBalanceView {
public var body: some View {
FungibleView(
thumbnail: viewState.icon,
caption1: viewState.title,
caption1: viewState.title ?? "-",
caption2: nil,
fallback: fallback,
amount: viewState.amount,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,22 +290,23 @@ extension DappDetails.View {
let store: StoreOf<DappDetails>

var body: some View {
WithViewStore(store, observe: \.viewState, send: { .view($0) }) { viewStore in
WithViewStore(store, observe: \.viewState, send: { .view($0) }) { _ in
VStack(spacing: .large2) {
VStack(spacing: .medium1) {
ToggleView(
title: L10n.AuthorizedDapps.DAppDetails.depositsTitle,
subtitle: viewStore.isDepositsVisible ? L10n.AuthorizedDapps.DAppDetails.depositsVisible : L10n.AuthorizedDapps.DAppDetails.depositsHidden,
minHeight: .zero,
isOn: viewStore.binding(
get: \.isDepositsVisible,
send: { .depositsVisibleToggled($0) }
)
)

Separator()
}
.padding(.horizontal, .small2)
// TODO: Revert as part of 1.10.0 release
// VStack(spacing: .medium1) {
// ToggleView(
// title: L10n.AuthorizedDapps.DAppDetails.depositsTitle,
// subtitle: viewStore.isDepositsVisible ? L10n.AuthorizedDapps.DAppDetails.depositsVisible : L10n.AuthorizedDapps.DAppDetails.depositsHidden,
// minHeight: .zero,
// isOn: viewStore.binding(
// get: \.isDepositsVisible,
// send: { .depositsVisibleToggled($0) }
// )
// )
//
// Separator()
// }
// .padding(.horizontal, .small2)

Button(L10n.AuthorizedDapps.DAppDetails.forgetDapp) {
store.send(.view(.forgetThisDappTapped))
Expand Down
4 changes: 4 additions & 0 deletions RadixWallet/Features/ScanQR/Children/ScanQR/ScanQR+View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ extension ScanQR.View {
.foregroundColor(.app.gray1)
}
}

if store.kind == .connectorExtension {
InfoButton(.radixconnect, label: L10n.ScanQR.ConnectorExtension.radixConnectLearMore)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ extension CustomizeFees {
.foregroundColor(.app.gray1)
.multilineTextAlignment(.center)
.padding(.bottom, .medium2)

InfoButton(.transactionfee, label: L10n.CustomizeNetworkFees.howDoFeesWork)
.padding(.bottom, .medium2)
}
}

Expand Down Expand Up @@ -158,7 +161,10 @@ extension CustomizeFees {
if viewState.insufficientBalance {
WarningErrorView(text: L10n.CustomizeNetworkFees.Warning.insufficientBalance, type: .error)
} else if viewState.linkingNewAccount {
WarningErrorView(text: L10n.TransactionReview.FeePayerValidation.linksNewAccount, type: .warning)
HStack(alignment: .center, spacing: .small1) {
WarningErrorView(text: L10n.TransactionReview.FeePayerValidation.linksNewAccount, type: .warning)
InfoButton(.payingaccount)
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,6 @@ extension TransactionReview {
let proofsStore = store.scope(state: \.proofs) { .child(.proofs($0)) }
return IfLetStore(proofsStore) { childStore in
TransactionReviewProofs.View(store: childStore)
.padding(.bottom, .medium1)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,23 @@ extension TransactionReviewProofs {

public var body: some SwiftUI.View {
WithViewStore(store, observe: { $0 }, send: { .view($0) }) { viewStore in
VStack(alignment: .leading, spacing: 0) {
VStack(alignment: .leading, spacing: .medium2) {
HStack {
Text(L10n.TransactionReview.presentingHeading)
.sectionHeading
.textCase(.uppercase)

// FIXME: Uncomment and implement
// TransactionReviewInfoButton {
// viewStore.send(.infoTapped)
// }
InfoButton(.badges)

Spacer(minLength: 0)
}
.padding(.bottom, .medium2)

VStack(spacing: .medium3) {
ForEach(viewStore.proofs) { proof in
ResourceBalanceView(proof.resourceBalance.viewState, appearance: .compact) {
viewStore.send(.proofTapped(proof))
}
ForEach(viewStore.proofs) { proof in
ResourceBalanceView(proof.resourceBalance.viewState, appearance: .compact) {
viewStore.send(.proofTapped(proof))
}
Separator()
}
.padding(.bottom, .medium3)
Separator()
}
}
}
Expand Down

0 comments on commit 1a5e1f2

Please sign in to comment.