Skip to content

Commit

Permalink
Removed unused icons and modules (#651)
Browse files Browse the repository at this point in the history
* Removed unused icons and modules

* Removing unused assets

* Connected apps view refactoring
  • Loading branch information
Oleg-Pecheneg authored Aug 22, 2024
1 parent 4fead01 commit da8d848
Show file tree
Hide file tree
Showing 231 changed files with 502 additions and 4,055 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
//

import Foundation
import Combine

final class WCRequestsHandlingService: WCRequestsHandlingServiceProtocol, WalletConnectExternalWalletHandlerProtocol {
private(set) var eventsPublisher = PassthroughSubject<WalletConnectServiceEvent, Never>()

func handleWCRequest(_ request: WCRequest, target: UDWallet) async throws {

}
Expand All @@ -27,7 +30,7 @@ struct UnifiedConnectAppInfo: UnifiedConnectAppInfoProtocol {

var walletAddress: HexAddress
var appName: String
var displayName: String
var displayName: String { appName }

var appIconUrls: [String] = []
var appUrlString: String = ""
Expand All @@ -37,10 +40,14 @@ struct UnifiedConnectAppInfo: UnifiedConnectAppInfoProtocol {
var chainIds: [Int] = []

init(name: String = "Uniswap",
walletAddress: String = "") {
walletAddress: String = "") {
self.walletAddress = walletAddress
self.appName = name
self.displayName = name
}

init(from appV2: WCConnectedAppsStorageV2.ConnectedApp) {
self.walletAddress = appV2.walletAddress
self.appName = appV2.appName
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ struct WCConnectedAppsStorageV2 {
}
}

struct ConnectedApp: Codable, Equatable, Hashable, CustomStringConvertible {

var walletAddress: HexAddress
var appName: String

var description: String {
"ConnectedApp:"
}

}
}

struct AppMetadata {
Expand Down
208 changes: 34 additions & 174 deletions unstoppable-ios-app/domains-manager-ios.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct DomainProfileBadgeDisplayInfo: Hashable {
func loadBadgeIcon() async -> UIImage? {
if badge.code == "Web3DomainHolder" {
// Hard code specifically for UD logo in mobile app. Request from designer.
return .udBadgeLogo
return .udCartLogo
} else if let url = URL(string: badge.logo) {
return await appContext.imageLoadingService.loadImage(from: .url(url,
maxSize: Constants.downloadedIconMaxSize),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// MockEntitiesFabric+WC.swift
// domains-manager-ios
//
// Created by Oleg Kuplin on 22.08.2024.
//

import Foundation

extension MockEntitiesFabric {
@MainActor
enum WC {


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,8 @@ extension NFTDisplayInfo {
return Image(systemName: "number")
case .chain:
return Image(systemName: "link")
// return .chainLinkIcon
case .lastSaleDate:
return Image(systemName: "clock")
// return .timeIcon
case .rarity:
return Image(systemName: "sparkles")
case .holdDays:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ enum Toast: Hashable {
case .walletAddressCopied, .walletAdded, .iCloudBackupRestored, .walletRemoved, .walletDisconnected, .changesConfirmed, .mintingSuccessful, .domainCopied, .itemSaved, .itemCopied, .userLoggedOut, .communityProfileEnabled, .purchaseDomainsDiscountApplied, .followedProfileAs, .domainRemoved, .cartCleared:
return .checkCircleWhite
case .noInternetConnection:
return .connectionOffIcon
return .cloudOfflineIcon
case .updatingRecords:
return .refreshIcon
case .mintingUnavailable:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1354,8 +1354,8 @@ extension String {
}

enum BlockChainIcons: String {
case ethereum = "smallEthereum"
case matic = "smallMatic"
case ethereum = "ETH"
case matic = "MATIC"
case base = "BASE"
}

Expand Down
79 changes: 5 additions & 74 deletions unstoppable-ios-app/domains-manager-ios/Extensions/UIImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@ extension UIImage {
static let cloudIcon = UIImage(named: "cloudIcon")!
static let checkCircleWhite = UIImage(named: "checkCircleWhite")!
static let checkCircle = UIImage(named: "checkCircle")!
static let connectionOffIcon = UIImage(named: "connectionOffIcon")!
static let shareIcon = UIImage(named: "shareIcon")!
static let shareIconSmall = UIImage(named: "shareIconSmall")!
static let penIcon = UIImage(named: "penIcon")!
static let dotsCircleIcon = UIImage(named: "dotsCircleIcon")!
static let udLogo = UIImage(named: "udLogo")!
static let walletBTCIcon = UIImage(named: "walletBTCIcon")!
static let stopIcon = UIImage(named: "stopIcon")!
static let infoIcon16 = UIImage(named: "infoIcon16")!
static let infoIcon12 = UIImage(named: "infoIcon12")!

static let crossWhite = UIImage(named: "crossWhite")!
static let refreshIcon = UIImage(named: "refreshIcon")!
Expand All @@ -40,19 +36,12 @@ extension UIImage {
static let dotsIcon = UIImage(named: "dotsIcon")!
static let appleIcon = UIImage(named: "appleIcon")!
static let gasFeeIcon = UIImage(named: "gasFeeIcon")!
static let sparklesIcon = UIImage(named: "sparklesIcon")!
static let chevronDown = UIImage(named: "newChevronDown")!
static let chevronDown = UIImage(named: "chevronDown")!
static let chevronUp = UIImage(named: "chevronUp")!
static let domainsProfileIcon = UIImage(named: "domainsProfileIcon")!
static let magicWandIcon = UIImage(named: "magicWandIcon")!
static let widgetIcon = UIImage(named: "widgetIcon")!
static let searchIcon = UIImage(named: "searchIcon")!
static let ethBGLarge = UIImage(named: "ethBGLarge")!
static let maticBGLarge = UIImage(named: "maticBGLarge")!
static let baseBGLarge = UIImage(named: "BASE")!
static let baseBGSmall = UIImage(named: "BASE")!
static let ethBGSmall = UIImage(named: "ethBGSmall")!
static let maticBGSmall = UIImage(named: "maticBGSmall")!
static let checkBadge = UIImage(named: "checkBadge")!
static let grimaseIcon = UIImage(named: "grimaseIcon")!
static let cloudOfflineIcon = UIImage(named: "cloudOfflineIcon")!
Expand All @@ -65,41 +54,31 @@ extension UIImage {
static let cancelCircleIcon = UIImage(named: "cancelCircleIcon")!
static let vaultIcon = UIImage(named: "vaultIcon")!
static let smileIcon = UIImage(named: "smileIcon")!
static let tapIcon = UIImage(named: "tapIcon")!
static let walletIcon = UIImage(named: "walletIcon")!
static let udWalletListIcon = UIImage(named: "udWalletListIcon")!
static let recoveryPhraseIcon = UIImage(named: "recoveryPhraseIcon")!
static let plusIconSmall = UIImage(named: "plusIconSmall")!
static let plusIcon = UIImage(named: "plusIcon")!
static let plusIconNav = UIImage(named: "plusIconNav")!
static let domainsListIcon = UIImage(named: "domainsListIcon")!
static let cartIcon = UIImage(named: "cartIcon")!
static let udCartLogo = UIImage(named: "udCartLogo")!
static let navArrowLeft = UIImage(named: "navArrowLeft")!
static let cancelIcon = UIImage(named: "cancelIcon")!
static let domainSharePlaceholder = UIImage(named: "domainSharePlaceholder")!
static let walletOpen = UIImage(named: "walletOpen")!
static let reverseResolutionCircleSign = UIImage(named: "reverseResolutionCircleSign")!
static let reverseResolutionArrows = UIImage(named: "reverseResolutionArrows")!
static let reverseResolutionArrows12 = UIImage(named: "reverseResolutionArrows12")!
static let homeDomainInfoVisualisation = UIImage(named: "homeDomainInfoVisualisation")!
static let trashIcon = UIImage(named: "trashIcon")!
static let trashFill = UIImage(named: "trashFill")!
static let settingsIconAppearance = UIImage(named: "settingsIconAppearance")!
static let infoIcon = UIImage(named: "settingsIconPrivacy")!
static let infoIcon = UIImage(named: "infoIcon")!
static let arrowTopRight = UIImage(named: "arrowTopRight")!
static let framesIcon = UIImage(named: "framesIcon")!
static let framesIcon16 = UIImage(named: "framesIcon16")!
static let framesIcon20 = UIImage(named: "framesIcon20")!
static let scanQRIcon = UIImage(named: "scanQRIcon")!
static let scanQRIcon16 = UIImage(named: "scanQRIcon16")!
static let scanQRIcon20 = UIImage(named: "scanQRIcon20")!
static let web3ProfileIllustration = UIImage(named: "web3ProfileIllustration")!
static let web3ProfileIllustrationLarge = UIImage(named: "web3ProfileIllustrationLarge")!
static let web3ProfileIllustrationLargeiPhoneSE = UIImage(named: "web3ProfileIllustrationLargeiPhoneSE")!
static let createProfilePullUpIllustration = UIImage(named: "createProfilePullUpIllustration")!
static let profileAccessIllustration = UIImage(named: "profileAccessIllustration")!
static let profileAccessIllustrationLarge = UIImage(named: "profileAccessIllustrationLarge")!
static let profileAccessIllustrationLargeiPhoneSE = UIImage(named: "profileAccessIllustrationLargeiPhoneSE")!
static let avatarsIcon16 = UIImage(named: "avatarsIcon16")!
static let avatarsIcon20 = UIImage(named: "avatarsIcon20")!
static let avatarsIcon24 = UIImage(named: "avatarsIcon24")!
static let avatarsIcon32 = UIImage(named: "avatarsIcon32")!
Expand All @@ -110,7 +89,6 @@ extension UIImage {
static let rocketIcon20 = UIImage(named: "rocketIcon20")!
static let walletBTCIcon20 = UIImage(named: "walletBTCIcon20")!
static let refreshArrow20 = UIImage(named: "refreshArrow20")!
static let refreshArrow24 = UIImage(named: "refreshArrow24")!
static let mailIcon24 = UIImage(named: "mailIcon24")!
static let googleIcon24 = UIImage(named: "googleIcon24")!
static let locationIcon24 = UIImage(named: "locationIcon24")!
Expand All @@ -119,41 +97,24 @@ extension UIImage {
static let moduleIcon24 = UIImage(named: "moduleIcon24")!
static let badgesStarIcon24 = UIImage(named: "badgesStarIcon24")!
static let udBadgeLogo = UIImage(named: "udBadgeLogo")!
static let smileyNegative = UIImage(named: "smileyNegative")!
static let alertCircle = UIImage(named: "alertCircle")!
static let hammerWrenchIcon24 = UIImage(named: "hammerWrenchIcon24")!
static let showcaseDomainProfileIllustration = UIImage(named: "showcaseDomainProfileIllustration")!
static let arrowRight = UIImage(named: "arrowRight")!
static let timeIcon24 = UIImage(named: "timeIcon24")!
static let dragIcon24 = UIImage(named: "dragIcon24")!
static let clock = UIImage(named: "clock")!
static let parkingIcon24 = UIImage(named: "parkingIcon24")!
static let logOutIcon24 = UIImage(named: "logOutIcon24")!
static let connectedAppNetworksInfoIllustration = UIImage(named: "connectedAppNetworksInfoIllustration")!
static let nfcIcon20 = UIImage(named: "nfcIcon20")!
static let giftBoxIcon20 = UIImage(named: "giftBoxIcon20")!
static let helpCircleIcon24 = UIImage(named: "helpCircleIcon24")!
static let messageCircleIcon24 = UIImage(named: "messageCircleIcon24")!
static let plusIcon18 = UIImage(named: "plusIcon18")!
static let arrowUp24 = UIImage(named: "arrowUp24")!
static let chatRequestsIcon = UIImage(named: "chatRequestsIcon")!
static let newMessageIcon = UIImage(named: "newMessageIcon")!
static let trashIcon16 = UIImage(named: "trashIcon16")!
static let alertOctagon24 = UIImage(named: "alertOctagon24")!
static let infoEmptyIcon24 = UIImage(named: "infoEmptyIcon24")!
static let docsIcon24 = UIImage(named: "docsIcon24")!
static let helpIcon24 = UIImage(named: "helpIcon24")!
static let followerGrayPlaceholder = UIImage(named: "followerGrayPlaceholder")!
static let cellChevron = UIImage(named: "cellChevron")!
static let udCartLogoRaster = UIImage(named: "udCartLogoRaster")!
static let chooseRRDomainIllustration = UIImage(named: "chooseRRDomainIllustration")!
static let check = UIImage(named: "check")!
static let statsIcon = UIImage(named: "statsIcon")!
static let sparkleIcon = UIImage(named: "sparkleIcon")!
static let chevronRight = UIImage(named: "chevronRight")!
static let tagsCashIcon = UIImage(named: "tagsCashIcon")!
static let usaFlagIcon = UIImage(named: "usaFlagIcon")!
static let tagIcon = UIImage(named: "tagIcon")!
static let tapSingleIcon = UIImage(named: "tapSingleIcon")!
static let layoutGridEmptyIcon = UIImage(named: "layoutGridEmptyIcon")!
static let squareBehindSquareIcon = UIImage(named: "squareBehindSquareIcon")!
static let personIcon = UIImage(named: "personIcon")!
Expand Down Expand Up @@ -243,36 +204,6 @@ extension UIImage {
.withRenderingMode(.alwaysTemplate)
}

class func getNetworkLargeIcon(by blockchainType: BlockchainType) -> UIImage? {
switch blockchainType {
case .Ethereum:
return .ethBGLarge
case .Matic:
return .maticBGLarge
case .Base:
return .baseBGLarge
case .Bitcoin:
return .bitcoinIcon
case .Solana:
return .solanaIcon
}
}

class func getNetworkSmallIcon(by blockchainType: BlockchainType) -> UIImage? {
switch blockchainType {
case .Ethereum:
return .ethBGSmall
case .Matic:
return .maticBGSmall
case .Base:
return .baseBGSmall
case .Bitcoin:
return .bitcoinIcon
case .Solana:
return .solanaIcon
}
}

func cropTo(rect: CGRect) -> UIImage? {
UIGraphicsBeginImageContext(rect.size)
let context = UIGraphicsGetCurrentContext()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class DomainProfileTopInfoCell: BaseDomainProfileTopInfoCell {

avatarButton.setTitle(nil, image: .avatarsIcon32)
bannerButton.setTitle(String.Constants.addCover.localized(), image: .framesIcon20)
qrCodeButton.setTitle(String.Constants.qrCode.localized(), image: .scanQRIcon16)
qrCodeButton.setTitle(String.Constants.qrCode.localized(), image: .scanQRIcon)
followersButton.isHidden = true
domainNameLabel.numberOfLines = 2
domainNameLabel.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(didTapDomainNameLabel)))
Expand Down

This file was deleted.

Loading

0 comments on commit da8d848

Please sign in to comment.