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-1898 - Send crypto #480

Merged
merged 31 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3eeac6c
MOB-1900 - Update home screen for send crypto (#449)
Oleg-Pecheneg Mar 20, 2024
62411b3
MOB-1903 - UI for receiver selection (#450)
Oleg-Pecheneg Mar 20, 2024
9ccc5bf
MOB-1904 - UI for select asset to send (#451)
Oleg-Pecheneg Mar 20, 2024
071002f
MOB-1905 - UI for token amount input (#453)
Oleg-Pecheneg Mar 21, 2024
f941702
MOB-1909 - Global search receiver functionality (#454)
Oleg-Pecheneg Mar 21, 2024
0ea829a
MOB-1910 - Confirm send crypto UI (#455)
Oleg-Pecheneg Mar 22, 2024
1c960df
Updated tilda icon
Oleg-Pecheneg Mar 22, 2024
c44e59e
MOB-1916 - Screen to scan wallet address (#457)
Oleg-Pecheneg Mar 25, 2024
1bab767
Merge branch 'development' into dev/feat/send_crypto/MOB-1898-send-cr…
Oleg-Pecheneg Mar 25, 2024
988c567
MOB-1917 - UI for domains selection to transfer (#459)
Oleg-Pecheneg Mar 25, 2024
33ec527
MOB-1919 - Confirm domain transfer UI and functionality (#460)
Oleg-Pecheneg Mar 26, 2024
fcf685f
MOB-1920 - Implement UI for different states when send crypto (#461)
Oleg-Pecheneg Mar 26, 2024
b6a5a33
Miscellaneous fixes within send crypto feature (#462)
Oleg-Pecheneg Mar 27, 2024
2500d43
MOB-1924 - Added activity tab (#463)
Oleg-Pecheneg Mar 27, 2024
cd97d1d
Make imageUrl optional field in wallet transaction
Oleg-Pecheneg Mar 27, 2024
4746c24
Use symbol instead of full name in max tokens pull up
Oleg-Pecheneg Mar 27, 2024
3c27858
Show user wallets in search results
Oleg-Pecheneg Mar 28, 2024
5818a9f
Miscellaneous fixes within Send crypto feature (#464)
Oleg-Pecheneg Mar 29, 2024
05bd2c3
MOB-1928 - Connected send crypto functionality to UI (#465)
Oleg-Pecheneg Apr 1, 2024
941b363
MOB-1932 - Added analytics to send crypto module (#466)
Oleg-Pecheneg Apr 1, 2024
a2c775b
MOB-1924 - Update tx list ui logic (#467)
Oleg-Pecheneg Apr 3, 2024
c72efae
MOB-1933 Fetch gas prices from Infura (#471)
rommex Apr 3, 2024
e2c33a0
Merge branch 'development' into dev/feat/send_crypto/MOB-1898-send-cr…
Oleg-Pecheneg Apr 3, 2024
4ac9cae
Update copy for minting tx (when there's no from address)
Oleg-Pecheneg Apr 3, 2024
80aa3d0
Various improvements within Send crypto feature (#473)
Oleg-Pecheneg Apr 3, 2024
da6f477
Merge branch 'development' into dev/feat/send_crypto/MOB-1898-send-cr…
Oleg-Pecheneg Apr 4, 2024
ab0c6e8
Fixing unit tests
Oleg-Pecheneg Apr 4, 2024
1e76f45
Added bottom padding to confirm button
Oleg-Pecheneg Apr 4, 2024
0cedcab
MOB-1940 - Updated search to purchase title
Oleg-Pecheneg Apr 4, 2024
28fbd76
Updated pull up height
Oleg-Pecheneg Apr 4, 2024
3c5e0fa
Merge branch 'development' into dev/feat/send_crypto/MOB-1898-send-cr…
Oleg-Pecheneg Apr 4, 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 @@ -75,6 +75,7 @@ final class AppContext: AppContextProtocol {
var hotFeatureSuggestionsService: HotFeatureSuggestionsServiceProtocol = HotFeatureSuggestionsService(fetcher: PreviewHotFeaturesSuggestionsFetcher())
var walletsDataService: WalletsDataServiceProtocol = PreviewWalletsDataService()
var domainProfilesService: DomainProfilesServiceProtocol
var walletTransactionsService: WalletTransactionsServiceProtocol

func createStripeInstance(amount: Int, using secret: String) -> StripeServiceProtocol {
StripeService(paymentDetails: .init(amount: amount, paymentSecret: secret))
Expand All @@ -86,6 +87,9 @@ final class AppContext: AppContextProtocol {
walletsDataService: walletsDataService)
domainProfilesService = DomainProfilesService(storage: PreviewPublicDomainProfileDisplayInfoStorageService(),
walletsDataService: walletsDataService)

walletTransactionsService = WalletTransactionsService(networkService: NetworkService(),
cache: InMemoryWalletTransactionsCache())
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
import Foundation

final class DomainRecordsService: DomainRecordsServiceProtocol {
func saveRecords(records: [RecordToUpdate], in domain: DomainItem, paymentConfirmationDelegate: PaymentConfirmationDelegate) async throws {
func saveRecords(records: [RecordToUpdate], in domain: DomainItem, paymentConfirmationHandler: PaymentConfirmationHandler) async throws {

}


}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ final class ImageLoadingService: ImageLoadingServiceProtocol {
return await loadImage(from: .initials(ticker, size: size, style: style), downsampleDescription: downsampleDescription)
case .url(let url, let maxImageSize):
do {
return UIImage.Preview.previewLandscape
let imageData = try Data(contentsOf: url)

if let gif = await GIFAnimationsService.shared.createGIFImageWithData(imageData) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ extension StripeService: StripeServiceProtocol {
}


static var isApplePaySupported: Bool {
true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ final class UDWalletsService: UDWalletsServiceProtocol {
nil
}

func setReverseResolution(to domain: DomainItem, paymentConfirmationDelegate: PaymentConfirmationDelegate) async throws {
func setReverseResolution(to domain: DomainItem, paymentConfirmationHandler: PaymentConfirmationHandler) async throws {

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ typealias ResponseV2 = String
typealias SessionV2Proxy = String

final class WalletConnectServiceV2: WalletConnectServiceV2Protocol {
func sendSignTx(sessions: [WCConnectedAppsStorageV2.SessionProxy], chainId: Int, tx: EthereumTransaction, address: HexAddress, in wallet: UDWallet) async throws -> ResponseV2 {
throw NSError()
}

var delegate: WalletConnectDelegate?

func getWCV2Request(for code: QRCode) throws -> WalletConnectURI {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// PreviewCryptoSender.swift
// domains-manager-ios
//
// Created by Oleg Kuplin on 01.04.2024.
//

import Foundation

typealias UDBigUInt = Int

struct CryptoSender: CryptoSenderProtocol {

let wallet: UDWallet

func canSendCrypto(token: CryptoSender.SupportedToken, chainType: BlockchainType) -> Bool {
true
}

func sendCrypto(crypto: CryptoSendingSpec, chain: ChainSpec, toAddress: HexAddress) async throws -> String {
""
}

func computeGasFeeFrom(maxCrypto: CryptoSendingSpec, on chain: ChainSpec, toAddress: HexAddress) async throws -> EVMTokenAmount {
.init(wei: 12300)
}

func fetchGasPrices(on chain: ChainSpec) async throws -> EstimatedGasPrices {
.init(normal: .init(gwei: 123), fast: .init(gwei: 432), urgent: .init(gwei: 742))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,16 @@ extension NetworkService: DomainProfileNetworkServiceProtocol {
}
}

// MARK: - WalletTransactionsNetworkServiceProtocol
extension NetworkService: WalletTransactionsNetworkServiceProtocol {
func getTransactionsFor(wallet: HexAddress,
cursor: String?,
chain: String?,
forceRefresh: Bool) async throws -> [WalletTransactionsPerChainResponse] {
MockEntitiesFabric.WalletTxs.createMockTxsResponses()
}
}

extension NetworkService {
static let ipfsRedirectKey = "ipfs.html.value"

Expand All @@ -267,6 +277,14 @@ extension NetworkService {
struct TxPayload {

}


struct ActionsPaymentInfo: Decodable {
let id: String
let clientSecret: String
let totalAmount: UInt
}

}

enum NetworkLayerError: LocalizedError, RawValueLocalizable {
Expand Down
Loading