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-1910 - Confirm send crypto UI #455

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
0ae2847
Updated receive button place. Removed current profile switcher.
Oleg-Pecheneg Mar 20, 2024
5620fba
Updated home screen title view
Oleg-Pecheneg Mar 20, 2024
58ed3b0
Added send crypto view.
Oleg-Pecheneg Mar 20, 2024
6dae04d
Added section with user's wallets
Oleg-Pecheneg Mar 20, 2024
0505a33
Added send crypto view model
Oleg-Pecheneg Mar 20, 2024
9d55bee
Refactoring
Oleg-Pecheneg Mar 20, 2024
cb79a3f
Updated nav bar customisation
Oleg-Pecheneg Mar 20, 2024
6e30f15
Disable interactive dismiss when navigate
Oleg-Pecheneg Mar 20, 2024
ec8e5ac
Extracted tab selection view from explore module
Oleg-Pecheneg Mar 20, 2024
11b9490
Refactoring
Oleg-Pecheneg Mar 20, 2024
2ab2e5d
Created UI for token balance
Oleg-Pecheneg Mar 20, 2024
c7d48e6
Make tokens selectable
Oleg-Pecheneg Mar 20, 2024
6502182
Added UI for domains list in assets selection
Oleg-Pecheneg Mar 20, 2024
3853c47
Created senc crypto flow actions
Oleg-Pecheneg Mar 20, 2024
b0c4621
Pass actions from select receiver and asset type views
Oleg-Pecheneg Mar 20, 2024
bef3953
Refactoring
Oleg-Pecheneg Mar 20, 2024
8342291
Fixed initial onAppear call in token icons view
Oleg-Pecheneg Mar 20, 2024
5ba0893
Created UDNumberButtonView
Oleg-Pecheneg Mar 20, 2024
eed79a7
Created number pad view and input interpreter.
Oleg-Pecheneg Mar 20, 2024
f0d83eb
Improved number pad logic
Oleg-Pecheneg Mar 20, 2024
1737f29
Added UI for input and token info
Oleg-Pecheneg Mar 20, 2024
10d900f
Added converted value label and toggle
Oleg-Pecheneg Mar 20, 2024
98e573a
Merge branch 'dev/feat/send_crypto/MOB-1898-send-crypto' into dev/fea…
Oleg-Pecheneg Mar 20, 2024
4e300d4
Merge branch 'dev/feat/send_crypto/MOB-1903-receiver-selection' into …
Oleg-Pecheneg Mar 20, 2024
492f4d6
Merge branch 'dev/feat/send_crypto/MOB-1904-select-asset' into dev/fe…
Oleg-Pecheneg Mar 20, 2024
00001eb
Added confirmation button
Oleg-Pecheneg Mar 20, 2024
0d418fa
Refactoring
Oleg-Pecheneg Mar 20, 2024
780fa09
Merge branch 'dev/feat/send_crypto/MOB-1898-send-crypto' into dev/fea…
Oleg-Pecheneg Mar 20, 2024
cc04daf
Merge branch 'dev/feat/send_crypto/MOB-1904-select-asset' into dev/fe…
Oleg-Pecheneg Mar 20, 2024
124c2dc
Merge branch 'dev/feat/send_crypto/MOB-1898-send-crypto' into dev/fea…
Oleg-Pecheneg Mar 20, 2024
dcf1b17
Disable animation for primary input view
Oleg-Pecheneg Mar 21, 2024
6c0b7d1
Swap buy and send actions on home screen
Oleg-Pecheneg Mar 21, 2024
b3ccec2
Fixed copy on select receiver screen
Oleg-Pecheneg Mar 21, 2024
cfc6efd
Added token icon near primary input value
Oleg-Pecheneg Mar 21, 2024
4562e1b
Adjusted UI for nav bar and in the IP SE
Oleg-Pecheneg Mar 21, 2024
4ca20d6
Added search by domain profiles
Oleg-Pecheneg Mar 21, 2024
11b7cac
Show direct wallet address result
Oleg-Pecheneg Mar 21, 2024
51ba6de
Fixed first responder reset issue
Oleg-Pecheneg Mar 21, 2024
a82ea85
Implemented UI for token's sending value info
Oleg-Pecheneg Mar 21, 2024
e2b3e22
Implemented UI for connector between sender and receiver
Oleg-Pecheneg Mar 21, 2024
5a9ffbf
Created curve shape for info section
Oleg-Pecheneg Mar 21, 2024
ae82633
Implemented UI for send info
Oleg-Pecheneg Mar 21, 2024
e9a5628
Added confirm button
Oleg-Pecheneg Mar 21, 2024
b69e89b
Updated icons on info view
Oleg-Pecheneg Mar 21, 2024
56c4df7
Localize content
Oleg-Pecheneg Mar 21, 2024
828df33
Use data from selected token
Oleg-Pecheneg Mar 21, 2024
5575192
Created structure for asset receiver.
Oleg-Pecheneg Mar 21, 2024
f924f98
Pass data to SelectTokenAssetAmountToSendView
Oleg-Pecheneg Mar 21, 2024
23a1a27
Pass data to ConfirmSendTokenView
Oleg-Pecheneg Mar 21, 2024
e109e1e
Show receiver info on confirmation screen
Oleg-Pecheneg Mar 21, 2024
41034f9
Show sender information
Oleg-Pecheneg Mar 21, 2024
5ea70e7
Calculate and show formatted amount to send
Oleg-Pecheneg Mar 21, 2024
82f164e
Added convertation and formatting on select amount and confirm screens
Oleg-Pecheneg Mar 21, 2024
1c8588c
Merge branch 'dev/feat/send_crypto/MOB-1898-send-crypto' into dev/fea…
Oleg-Pecheneg Mar 21, 2024
fe9d202
Merge branch 'dev/feat/send_crypto/MOB-1909-search-receiver' into dev…
Oleg-Pecheneg Mar 21, 2024
2f66d28
Merge branch 'dev/feat/send_crypto/MOB-1898-send-crypto' into dev/fea…
Oleg-Pecheneg Mar 21, 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
26 changes: 26 additions & 0 deletions unstoppable-ios-app/domains-manager-ios.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,12 @@
C62901012BAAD3C3008B35A2 /* NumberPadInputInterpreter.swift in Sources */ = {isa = PBXBuildFile; fileRef = C62900FF2BAAD3C3008B35A2 /* NumberPadInputInterpreter.swift */; };
C629A4602A3FF13600A528A1 /* MessagingChatMessageImageBase64TypeDisplayInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = C629A45F2A3FF13600A528A1 /* MessagingChatMessageImageBase64TypeDisplayInfo.swift */; };
C629A4802A403C1C00A528A1 /* MessagingChatConversationState.swift in Sources */ = {isa = PBXBuildFile; fileRef = C629A47F2A403C1C00A528A1 /* MessagingChatConversationState.swift */; };
C62AC1FC2BABE565003FB69E /* ConfirmSendTokenView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C62AC1FB2BABE565003FB69E /* ConfirmSendTokenView.swift */; };
C62AC1FD2BABE565003FB69E /* ConfirmSendTokenView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C62AC1FB2BABE565003FB69E /* ConfirmSendTokenView.swift */; };
C62AC1FF2BABF0D0003FB69E /* ConfirmSendTokenSenderReceiverConnectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C62AC1FE2BABF0D0003FB69E /* ConfirmSendTokenSenderReceiverConnectView.swift */; };
C62AC2002BABF0D0003FB69E /* ConfirmSendTokenSenderReceiverConnectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C62AC1FE2BABF0D0003FB69E /* ConfirmSendTokenSenderReceiverConnectView.swift */; };
C62AC2022BABF532003FB69E /* ConfirmSendTokenReviewInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C62AC2012BABF532003FB69E /* ConfirmSendTokenReviewInfoView.swift */; };
C62AC2032BABF532003FB69E /* ConfirmSendTokenReviewInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C62AC2012BABF532003FB69E /* ConfirmSendTokenReviewInfoView.swift */; };
C62BDA412B5E4104008E21AD /* MessagingBlockUserInChatType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C62BDA402B5E4104008E21AD /* MessagingBlockUserInChatType.swift */; };
C62BDA422B5E4104008E21AD /* MessagingBlockUserInChatType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C62BDA402B5E4104008E21AD /* MessagingBlockUserInChatType.swift */; };
C62C3F8B283F34B90094FC93 /* ResendCodeButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = C62C3F8A283F34B90094FC93 /* ResendCodeButton.swift */; };
Expand Down Expand Up @@ -2940,6 +2946,9 @@
C62900FF2BAAD3C3008B35A2 /* NumberPadInputInterpreter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberPadInputInterpreter.swift; sourceTree = "<group>"; };
C629A45F2A3FF13600A528A1 /* MessagingChatMessageImageBase64TypeDisplayInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagingChatMessageImageBase64TypeDisplayInfo.swift; sourceTree = "<group>"; };
C629A47F2A403C1C00A528A1 /* MessagingChatConversationState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagingChatConversationState.swift; sourceTree = "<group>"; };
C62AC1FB2BABE565003FB69E /* ConfirmSendTokenView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfirmSendTokenView.swift; sourceTree = "<group>"; };
C62AC1FE2BABF0D0003FB69E /* ConfirmSendTokenSenderReceiverConnectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfirmSendTokenSenderReceiverConnectView.swift; sourceTree = "<group>"; };
C62AC2012BABF532003FB69E /* ConfirmSendTokenReviewInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfirmSendTokenReviewInfoView.swift; sourceTree = "<group>"; };
C62BDA402B5E4104008E21AD /* MessagingBlockUserInChatType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagingBlockUserInChatType.swift; sourceTree = "<group>"; };
C62C3F8A283F34B90094FC93 /* ResendCodeButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResendCodeButton.swift; sourceTree = "<group>"; };
C62C3F8F283F35610094FC93 /* CodeVerificationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodeVerificationView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -5245,6 +5254,16 @@
path = SelectTokenAssetAmount;
sourceTree = "<group>";
};
C62AC1FA2BABE544003FB69E /* ConfirmSendToken */ = {
isa = PBXGroup;
children = (
C62AC1FB2BABE565003FB69E /* ConfirmSendTokenView.swift */,
C62AC1FE2BABF0D0003FB69E /* ConfirmSendTokenSenderReceiverConnectView.swift */,
C62AC2012BABF532003FB69E /* ConfirmSendTokenReviewInfoView.swift */,
);
path = ConfirmSendToken;
sourceTree = "<group>";
};
C62C3F94283F35730094FC93 /* CodeVerificationView */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -6305,6 +6324,7 @@
C67213CD2BAA80670075B9C7 /* SelectReceiver */,
C67213E72BAA98EC0075B9C7 /* SelectAssetToSend */,
C62900F32BAAC821008B35A2 /* SelectTokenAssetAmount */,
C62AC1FA2BABE544003FB69E /* ConfirmSendToken */,
);
path = SendCryptoAsset;
sourceTree = "<group>";
Expand Down Expand Up @@ -8661,6 +8681,7 @@
C603E8C9285859560028C21C /* CollectionViewHeaderCell.swift in Sources */,
C635194828D03FFB00FC6AF8 /* ChooseReverseResolutionCollectionCell.swift in Sources */,
C6C1EC5A2A3AD2F3005EB37D /* UIMenuDomainAvatarLoader.swift in Sources */,
C62AC1FF2BABF0D0003FB69E /* ConfirmSendTokenSenderReceiverConnectView.swift in Sources */,
C64BCB7B2A6FB5B700EF8B47 /* MessagingChatMessageImageDataTypeDisplayInfo.swift in Sources */,
C6526DC529D2DC8500D6F2EB /* LoginInAppViewPresenter.swift in Sources */,
C6E1189E28F85BC600C6AD4D /* PrimaryWhiteButton.swift in Sources */,
Expand Down Expand Up @@ -9047,6 +9068,7 @@
C63392FC2B7271E800941C9D /* OffsetObservingListView.swift in Sources */,
C69F99772A9F2206004B1958 /* PublicProfileFollowersViewModel.swift in Sources */,
C6E69FF6288AE47D000A8346 /* ExternalEventsService.swift in Sources */,
C62AC1FC2BABE565003FB69E /* ConfirmSendTokenView.swift in Sources */,
C61DB11B2B95BD1200CDA243 /* DomainProfileDisplayInfo.swift in Sources */,
C64836C2282CC435007BD3F1 /* WalletCopyAddressAction.swift in Sources */,
C6F060CF2ACBC81300BA2E7E /* MessagingService+UserProfile.swift in Sources */,
Expand Down Expand Up @@ -9672,6 +9694,7 @@
C689C1752ADE56AF00AA0186 /* UDFeatureFlagsService.swift in Sources */,
C6B6858B280077F7000F9037 /* UIImage.swift in Sources */,
290A60422950A89900882109 /* WalletConnectServiceV2.swift in Sources */,
C62AC2022BABF532003FB69E /* ConfirmSendTokenReviewInfoView.swift in Sources */,
C6C9DEA02834B56200BAC36F /* ManageDomainLoadingCell.swift in Sources */,
C617FD9E2B58DBCA00B93433 /* WalletsDataServiceEnvironmentKey.swift in Sources */,
C68BEC0F2A397AD400A0B809 /* MessagingChatUserProfile.swift in Sources */,
Expand Down Expand Up @@ -9874,6 +9897,7 @@
C6D645BC2B1DBCE400D724AC /* ScrollViewOffsetListener.swift in Sources */,
C6C8F8352B217E9600A9834D /* CreateLocalWalletRecoveryWordsPresenter.swift in Sources */,
C6D645E82B1DBE6B00D724AC /* RaisedTertiaryButton.swift in Sources */,
C62AC2032BABF532003FB69E /* ConfirmSendTokenReviewInfoView.swift in Sources */,
C61807E52B19A5890032E543 /* MintingDomain.swift in Sources */,
C6D647602B1EDDBD00D724AC /* BaseTransactionInProgressViewPresenter.swift in Sources */,
C6C8F8A92B2182CF00A9834D /* MintDomainsConfigurationListHeaderView.swift in Sources */,
Expand Down Expand Up @@ -10124,6 +10148,7 @@
C6D6468A2B1ED12D00D724AC /* DomainProfileTopInfoSection.swift in Sources */,
C6D645892B1DBACB00D724AC /* CGSize.swift in Sources */,
C6D6467D2B1ED12900D724AC /* DomainProfileSection.swift in Sources */,
C62AC2002BABF0D0003FB69E /* ConfirmSendTokenSenderReceiverConnectView.swift in Sources */,
C6D645852B1DBA9D00D724AC /* BaseButton.swift in Sources */,
C64939FD2B637DDB00457363 /* ReverseResolutionSelectionView.swift in Sources */,
C6D646A82B1ED15A00D724AC /* PublicProfileCryptoListView.swift in Sources */,
Expand Down Expand Up @@ -10570,6 +10595,7 @@
C618081D2B19AB110032E543 /* PurchaseDomainsServiceEnvironmentKey.swift in Sources */,
C6D647382B1ED9EF00D724AC /* PaymentTransactionRequestConfirmationView.swift in Sources */,
C6D646A42B1ED15A00D724AC /* PublicProfileViewDelegate.swift in Sources */,
C62AC1FD2BABE565003FB69E /* ConfirmSendTokenView.swift in Sources */,
C6D646EF2B1ED5B200D724AC /* AddWalletViewController.swift in Sources */,
C6C8F82E2B217DE300A9834D /* ExternalWalletMake.swift in Sources */,
C61807D02B19A4040032E543 /* AnalyticsServiceEnvironment.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,23 @@ import Foundation

struct BalanceStringFormatter {

static func tokensBalanceString(_ balance: Double) -> String {
"$\(balance.formatted(toMaxNumberAfterComa: 2))"
static func tokenBalanceString(_ token: BalanceTokenUIDescription) -> String {
tokenBalanceString(balance: token.balance,
symbol: token.symbol)
}

static func tokenBalanceString(balance: Double,
symbol: String) -> String {
"\(balance.formattedBalance()) \(symbol)"
}

static func tokenFullBalanceString(balance: Double,
symbol: String) -> String {
"\(balance.formatted(toMaxNumberAfterComa: 8)) \(symbol)"
}

static func tokensBalanceUSDString(_ balance: Double) -> String {
"$\(balance.formattedBalance())"
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ struct BalanceTokenUIDescription: Hashable, Identifiable {
// MARK: - Open methods
extension BalanceTokenUIDescription {
var formattedBalanceWithSymbol: String {
"\(balance.formatted(toMaxNumberAfterComa: 2)) \(symbol)"
BalanceStringFormatter.tokenBalanceString(self)
}

var formattedBalanceUSD: String {
"$\(balanceUsd.formatted(toMaxNumberAfterComa: 2))"
BalanceStringFormatter.tokensBalanceUSDString(balanceUsd)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@ extension MockEntitiesFabric {
SendCryptoAssetViewModel(initialData: .init(sourceWallet: Wallet.mockEntities()[0]))
}

static func mockReceiver() -> SendCryptoAsset.AssetReceiver {
.init(wallet: Wallet.mockEntities()[1])
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ extension MockEntitiesFabric {
static func mockUIToken() -> BalanceTokenUIDescription {
BalanceTokenUIDescription(chain: "ETH",
symbol: "ETH",
name: "ETH",
name: "Ethereum",
balance: 1,
balanceUsd: 1,
marketUsd: 1)
marketUsd: 3900.34)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,8 @@ extension Double {
func formatted(toMaxNumberAfterComa maxNumberAfterComa: Int) -> String {
String(format: "%.\(maxNumberAfterComa)f", self)
}

func formattedBalance() -> String {
formatted(toMaxNumberAfterComa: 2)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,11 @@ extension String {
static let usingMax = "USING_MAX"
static let useMax = "USE_MAX"
static let results = "RESULTS"
static let youAreSending = "YOU_ARE_SENDING"
static let from = "FROM"
static let speed = "SPEED"
static let feeEstimate = "FEE_ESTIMATE"
static let sendCryptoReviewPromptMessage = "SEND_CRYPTO_REVIEW_PROMPT_MESSAGE"
}

enum BlockChainIcons: String {
Expand Down Expand Up @@ -1232,4 +1237,8 @@ extension String {
return self
}
}

var asURL: URL? {
URL(string: self)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ extension UIImage {
static let walletAddressesIcon = UIImage(named: "walletAddressesIcon")!
static let globeRotated = UIImage(named: "globeRotated")!
static let verticalLines = UIImage(named: "verticalLines")!
static let chevronGrabberVertical = UIImage(named: "chevronGrabberVertical")!
static let tildaIcon = UIImage(named: "tildaIcon")!
static let walletExternalIcon = UIImage(named: "walletExternalIcon")!

static let twitterIcon24 = UIImage(named: "twitterIcon24")!
static let discordIcon24 = UIImage(named: "discordIcon24")!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private extension PublicProfileTokensSectionView {

@ViewBuilder
func totalValueView(tokens: [BalanceTokenUIDescription]) -> some View {
Text(String.Constants.totalN.localized(BalanceStringFormatter.tokensBalanceString(tokens.totalBalanceUSD())))
Text(String.Constants.totalN.localized(BalanceStringFormatter.tokensBalanceUSDString(tokens.totalBalanceUSD())))
.foregroundStyle(Color.white.opacity(0.56))
.font(.currentFont(size: 16, weight: .medium))
}
Expand Down
Loading