diff --git a/unstoppable-ios-app/domains-manager-ios/Modules/Home/ShareWalletInfoView/ShareWalletAssetInfoView.swift b/unstoppable-ios-app/domains-manager-ios/Modules/Home/ShareWalletInfoView/ShareWalletAssetInfoView.swift index 01a311661..ecf69c03a 100644 --- a/unstoppable-ios-app/domains-manager-ios/Modules/Home/ShareWalletInfoView/ShareWalletAssetInfoView.swift +++ b/unstoppable-ios-app/domains-manager-ios/Modules/Home/ShareWalletInfoView/ShareWalletAssetInfoView.swift @@ -274,22 +274,7 @@ private extension ShareWalletAssetInfoView { } func filterMultiChainTokensToDisplay(tokens: [BalanceTokenUIDescription]) -> [BalanceTokenUIDescription] { - let groupedByChainTokens = [String : [BalanceTokenUIDescription]].init(grouping: tokens, by: { $0.chain }) - - var tokensToDisplay = [BalanceTokenUIDescription]() - - for key in groupedByChainTokens.keys.sorted() { - let chainTokens = groupedByChainTokens[key] ?? [] - let tokenToUse: BalanceTokenUIDescription - if chainTokens.count == 1 { - tokenToUse = chainTokens[0] - } else { - tokenToUse = chainTokens.filter({ $0.parent == nil }).first ?? chainTokens.first! - } - tokensToDisplay.append(tokenToUse) - } - - return tokensToDisplay + tokens } @ViewBuilder diff --git a/unstoppable-ios-app/domains-manager-ios/SwiftUI/ViewModifiers/ViewPullUp/Custom pull up views/CopyMultichainWalletAddressesPullUpView.swift b/unstoppable-ios-app/domains-manager-ios/SwiftUI/ViewModifiers/ViewPullUp/Custom pull up views/CopyMultichainWalletAddressesPullUpView.swift index 522ddf9a2..03101547f 100644 --- a/unstoppable-ios-app/domains-manager-ios/SwiftUI/ViewModifiers/ViewPullUp/Custom pull up views/CopyMultichainWalletAddressesPullUpView.swift +++ b/unstoppable-ios-app/domains-manager-ios/SwiftUI/ViewModifiers/ViewPullUp/Custom pull up views/CopyMultichainWalletAddressesPullUpView.swift @@ -92,14 +92,24 @@ extension CopyMultichainWalletAddressesPullUpView { let token: BalanceTokenUIDescription let selectionType: SelectionType @State private var icon: UIImage? + @State private var parentIcon: UIImage? var body: some View { - UDListItemView(title: token.name, - subtitle: token.address.walletAddressTruncated, - subtitleStyle: .default, - imageType: .uiImage(icon ?? .init()), - imageStyle: .full, - rightViewStyle: rightViewStyle()) + ZStack(alignment: .bottomLeading) { + UDListItemView(title: token.name, + subtitle: token.address.walletAddressTruncated, + subtitleStyle: .default, + imageType: .uiImage(icon ?? .init()), + imageStyle: .full, + rightViewStyle: rightViewStyle()) + if let parentIcon { + Image(uiImage: parentIcon) + .resizable() + .squareFrame(20) + .clipShape(Circle()) + .offset(x: 24, y: -2) + } + } .onAppear(perform: onAppear) } @@ -140,6 +150,9 @@ extension CopyMultichainWalletAddressesPullUpView { token.loadTokenIcon { image in self.icon = image } + token.loadParentIcon { image in + self.parentIcon = image + } } } } @@ -181,6 +194,7 @@ extension CopyMultichainWalletAddressesPullUpView { #Preview { CopyMultichainWalletAddressesPullUpView(tokens: [MockEntitiesFabric.Tokens.mockEthToken(), - MockEntitiesFabric.Tokens.mockMaticToken()], + MockEntitiesFabric.Tokens.mockMaticToken(), + MockEntitiesFabric.Tokens.mockUSDTToken()], selectionType: .copyOnly) }