Skip to content

Commit

Permalink
Fix: Remove "Unauthorized" label (#1080)
Browse files Browse the repository at this point in the history
  • Loading branch information
kugel3 committed Apr 10, 2024
1 parent 6431be5 commit 2cf6ec7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Aux/Config/Common.xcconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// MARK: - Custom flags

/// Application version shared across all targets and flavours
APP_VERSION = 1.5.2
APP_VERSION = 1.5.3

/// App Icon base name
APP_ICON = AppIcon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,7 @@ extension TransactionReview {
private func extractDappEntity(_ entity: Address) async throws -> DappEntity {
let dAppDefinitionAddress = try await onLedgerEntitiesClient.getDappDefinitionAddress(entity)
let metadata = try await onLedgerEntitiesClient.getDappMetadata(dAppDefinitionAddress, validatingDappEntity: entity)
let isAuthorized = await authorizedDappsClient.isDappAuthorized(dAppDefinitionAddress)
return DappEntity(id: dAppDefinitionAddress, metadata: metadata, isAuthorized: isAuthorized)
return DappEntity(id: dAppDefinitionAddress, metadata: metadata)
}

private func exctractProofs(_ accountProofs: [EngineToolkit.Address]) async throws -> TransactionReviewProofs.State? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ public struct TransactionReview: Sendable, FeatureReducer {
@Dependency(\.onLedgerEntitiesClient) var onLedgerEntitiesClient
@Dependency(\.continuousClock) var clock
@Dependency(\.errorQueue) var errorQueue
@Dependency(\.authorizedDappsClient) var authorizedDappsClient
@Dependency(\.pasteboardClient) var pasteboardClient

public init() {}
Expand Down Expand Up @@ -828,7 +827,6 @@ extension TransactionReview {
public struct DappEntity: Sendable, Identifiable, Hashable {
public let id: DappDefinitionAddress
public let metadata: OnLedgerEntity.Metadata
public let isAuthorized: Bool
}

public enum Account: Sendable, Hashable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ extension TransactionReview.DappEntity {
.known(
name: metadata.name,
thumbnail: metadata.iconURL,
id: id,
unauthorizedHint: isAuthorized ? nil : L10n.Common.unauthorized
id: id
)
}
}
Expand Down Expand Up @@ -59,7 +58,7 @@ extension TransactionReviewDapps {
extension TransactionReview {
struct DappView: SwiftUI.View {
enum ViewState: Hashable {
case known(name: String?, thumbnail: URL?, id: TransactionReview.DappEntity.ID, unauthorizedHint: String?)
case known(name: String?, thumbnail: URL?, id: TransactionReview.DappEntity.ID)
case unknown(String)
}

Expand All @@ -73,11 +72,11 @@ extension TransactionReview {

var body: some SwiftUI.View {
switch viewState {
case let .known(name, url, id, unauthorizedHint):
case let .known(name, url, id):
Card {
action(.knownDappTapped(id))
} contents: {
PlainListRow(title: name, subtitle: unauthorizedHint, accessory: nil) {
PlainListRow(title: name, accessory: nil) {
Thumbnail(.dapp, url: url)
}
}
Expand Down

0 comments on commit 2cf6ec7

Please sign in to comment.