Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOB-2139 - Buy multiple domains #647

Merged
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
fa8a99b
MOB-2140 - Let user to select multiple domains to buy on the search s…
Oleg-Pecheneg Aug 6, 2024
1986f66
MOB-2146 - Implement new UI to search domains to purchase (#625)
Oleg-Pecheneg Aug 8, 2024
081afaa
MOB-2151 - Implement new checkout view UI to purchase multiple domain…
Oleg-Pecheneg Aug 9, 2024
b7022de
MOB-2152 - Implemented tracking of recent search history (#627)
Oleg-Pecheneg Aug 12, 2024
1c3c2b1
MOB-2153 - Purchase domains Search filters (#628)
Oleg-Pecheneg Aug 12, 2024
b888266
MOB-2154 - Load and display purchase domains suggestions (#629)
Oleg-Pecheneg Aug 12, 2024
30be948
MOB-2155 - All done after domains purchased (#630)
Oleg-Pecheneg Aug 13, 2024
3eb0db2
MOB-2156 - Show minting domains in progress on the home view (#631)
Oleg-Pecheneg Aug 13, 2024
2dcfa28
MOB-2157 Preselect minting wallet from web (#632)
Oleg-Pecheneg Aug 13, 2024
72bf128
MOB-2159 - Updated analytics in new purchase flow (#634)
Oleg-Pecheneg Aug 13, 2024
8cc466a
MOB-2164 - Update search domains filters (#636)
Oleg-Pecheneg Aug 14, 2024
0b85175
Apply list of dns domains TLDs from the web app
Oleg-Pecheneg Aug 14, 2024
69bce59
Fixed load suggestions logic
Oleg-Pecheneg Aug 15, 2024
3a9aabc
Merge branch 'development' into dev/feat/purchase_domains/MOB-2139-bu…
Oleg-Pecheneg Aug 15, 2024
437bba6
MOB-2146 - Hide unavailable domains section (#642)
Oleg-Pecheneg Aug 16, 2024
ee87714
MOB-2155 - Fixed issue when credits were not applied (#643)
Oleg-Pecheneg Aug 16, 2024
69fbf39
Merge branch 'development' into dev/feat/purchase_domains/MOB-2139-bu…
Oleg-Pecheneg Aug 16, 2024
6b5949d
MOB-2152 - Improved recent result selection (#645)
Oleg-Pecheneg Aug 16, 2024
81b84da
Merge branch 'development' into dev/feat/purchase_domains/MOB-2139-bu…
Oleg-Pecheneg Aug 16, 2024
b4c02da
Fixed unnecessary refresh cart calls
Oleg-Pecheneg Aug 19, 2024
56eb14c
Filter suggestions for UD domains
Oleg-Pecheneg Aug 19, 2024
10184cc
Fixed search results is empty verification
Oleg-Pecheneg Aug 19, 2024
42473c6
Search for ENS and DNS domains (#648)
Oleg-Pecheneg Aug 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ final class AppContext: AppContextProtocol {
var domainProfilesService: DomainProfilesServiceProtocol
var walletTransactionsService: WalletTransactionsServiceProtocol
var mpcWalletsService: MPCWalletsServiceProtocol

var ipVerificationService: IPVerificationServiceProtocol = IPVerificationService()

func createStripeInstance(amount: Int, using secret: String) -> StripeServiceProtocol {
StripeService(paymentDetails: .init(amount: amount, paymentSecret: secret))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ final class GIFAnimationsService {
static let shared = GIFAnimationsService()

func createGIFImageWithData(_ data: Data,
id: String,
maxImageSize: CGFloat,
maskingType: GIFMaskingType? = nil) async -> UIImage? {
UIImage(data: data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ final class ImageLoadingService: ImageLoadingServiceProtocol {
return UIImage.Preview.previewLandscape
let imageData = try Data(contentsOf: url)

if let gif = await GIFAnimationsService.shared.createGIFImageWithData(imageData) {
if let gif = await GIFAnimationsService.shared.createGIFImageWithData(imageData,
id: UUID().uuidString,
maxImageSize: maxImageSize ?? Constants.downloadedImageMaxSize) {
return gif
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// PreviewIPVerificationService.swift
// domains-manager-ios
//
// Created by Oleg Kuplin on 13.08.2024.
//

import Foundation

final class IPVerificationService: IPVerificationServiceProtocol {
func isUserInTheUS() async throws -> Bool {
false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,28 @@ struct Storage {

class SpecificStorage<T: Codable> {
let fileName: String
private var data: T? = nil
private let queue = DispatchQueue(label: "preview.serial.storage")

init(fileName: String) {
self.fileName = fileName
}

func retrieve() -> T? {
nil
queue.sync { data }
}

@discardableResult
func store(_ data: T) -> Bool {

return true
queue.sync {
self.data = data
return true
}
}

func remove() {

queue.sync {
self.data = nil
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ import SwiftUI

@available(iOS 17, *)
#Preview {
let domain = DomainToPurchase(name: "oleg.x", price: 10000, metadata: nil, isAbleToPurchase: true)
let vc = DomainProfileViewController.nibInstance()
let presenter = PurchaseDomainDomainProfileViewPresenter(view: vc,
domain: domain)
vc.presenter = presenter
let nav = EmptyRootCNavigationController(rootViewController: vc)

return nav
EmptyView()
// let domain = DomainToPurchase(name: "oleg.x", price: 10000, metadata: nil, isAbleToPurchase: true)
// let vc = DomainProfileViewController.nibInstance()
// let presenter = PurchaseDomainDomainProfileViewPresenter(view: vc,
// domain: domain)
// vc.presenter = presenter
// let nav = EmptyRootCNavigationController(rootViewController: vc)
//
// return nav
}

Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,15 @@ class ViewController: UIViewController {
}

@IBAction func runPurchaseButtonPressed() {
UDRouter().showSearchDomainToPurchase(in: self) { result in

}

}

func showPurchaseDomainsSearch() {
let view = PurchaseSearchDomainsView(domainSelectedCallback: { _ in })
let view = PurchaseDomainsSearchView()

let vc = UIHostingController(rootView: view)
addChildViewController(vc, andEmbedToView: self.view)
}

func showPurchaseDomainsCheckout() {
let view = PurchaseDomainsCheckoutView(domain: .init(name: "oleg.x", price: 10000, metadata: nil, isAbleToPurchase: true),
selectedWallet: MockEntitiesFabric.Wallet.mockEntities()[0],
wallets: MockEntitiesFabric.Wallet.mockEntities(),
profileChanges: .init(domainName: "oleg.x"),
delegate: nil)

let vc = UIHostingController(rootView: view)
addChildViewController(vc, andEmbedToView: self.view)
}

func showDomainProfile() {
let domain = DomainToPurchase(name: "oleg.x", price: 10000, metadata: nil, isAbleToPurchase: true)
let vc = DomainProfileViewController.nibInstance()
let presenter = PurchaseDomainDomainProfileViewPresenter(view: vc,
domain: domain)
vc.presenter = presenter
let nav = EmptyRootCNavigationController(rootViewController: vc)
present(nav, animated: false)
}

}

Loading