From 3c109c2166b020c0fc7449ceb2efa4e2a1a73b6c Mon Sep 17 00:00:00 2001 From: Elizaveta Semenova Date: Mon, 12 Feb 2024 14:33:42 +0300 Subject: [PATCH 1/6] [ETH-949] Update unknown transaction presentation --- .../RendableListTransactionItem+HistoryTransaction.swift | 4 ++-- .../RendableListTransactionItem+PendingTransaction.swift | 2 +- p2p_wallet/Scenes/Main/Send/RecipientFormatter.swift | 8 ++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/p2p_wallet/Scenes/Main/History/New/Model/RendableListTransactionItem+HistoryTransaction.swift b/p2p_wallet/Scenes/Main/History/New/Model/RendableListTransactionItem+HistoryTransaction.swift index 7f6760de24..8b56800fab 100644 --- a/p2p_wallet/Scenes/Main/History/New/Model/RendableListTransactionItem+HistoryTransaction.swift +++ b/p2p_wallet/Scenes/Main/History/New/Model/RendableListTransactionItem+HistoryTransaction.swift @@ -131,7 +131,7 @@ struct RendableListHistoryTransactionItem: RendableListTransactionItem { case let .referralReward(data): return L10n.referralReward case .unknown, .none: - return L10n.unknown + return L10n.transaction } } @@ -156,7 +156,7 @@ struct RendableListHistoryTransactionItem: RendableListTransactionItem { case .referralReward: return date.string(withFormat: "HH:mm") default: - return "\(L10n.signature): \(RecipientFormatter.shortSignature(signature: trx.signature))" + return "\(RecipientFormatter.longSignature(signature: trx.signature))" } } diff --git a/p2p_wallet/Scenes/Main/History/New/Model/RendableListTransactionItem+PendingTransaction.swift b/p2p_wallet/Scenes/Main/History/New/Model/RendableListTransactionItem+PendingTransaction.swift index 3aec0fe47f..6669e688d7 100644 --- a/p2p_wallet/Scenes/Main/History/New/Model/RendableListTransactionItem+PendingTransaction.swift +++ b/p2p_wallet/Scenes/Main/History/New/Model/RendableListTransactionItem+PendingTransaction.swift @@ -93,7 +93,7 @@ struct RendableListPendingTransactionItem: RendableListTransactionItem { .from(RecipientFormatter .shortFormat(destination: transaction.claimableTokenInfo.keypair.publicKey.base58EncodedString)) default: - return L10n.unknown + return L10n.transaction } } diff --git a/p2p_wallet/Scenes/Main/Send/RecipientFormatter.swift b/p2p_wallet/Scenes/Main/Send/RecipientFormatter.swift index 2dcac9f7ba..a33f1d378d 100644 --- a/p2p_wallet/Scenes/Main/Send/RecipientFormatter.swift +++ b/p2p_wallet/Scenes/Main/Send/RecipientFormatter.swift @@ -25,8 +25,12 @@ enum RecipientFormatter { } } - static func shortSignature(signature: String) -> String { - "...\(signature.suffix(4))" + static func longSignature(signature: String) -> String { + if signature.count > 16 { + return "\(signature.prefix(8))...\(signature.suffix(8))" + } else { + return signature + } } static func signature(signature: String) -> String { From 374caa5096d262756731fa4ca54aa4f53a2d0cc7 Mon Sep 17 00:00:00 2001 From: Elizaveta Semenova Date: Mon, 12 Feb 2024 15:04:10 +0300 Subject: [PATCH 2/6] [ETH-949] Write token2022transferfee instead of transferfee --- .../SwapSettings/Info/ViewModel/SwapSettingsInfoViewModel.swift | 2 +- .../Scenes/Main/Swap/SwapSettings/View/SwapSettingsView.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/p2p_wallet/Scenes/Main/Swap/SwapSettings/Info/ViewModel/SwapSettingsInfoViewModel.swift b/p2p_wallet/Scenes/Main/Swap/SwapSettings/Info/ViewModel/SwapSettingsInfoViewModel.swift index 0f82c872df..7f644837cd 100644 --- a/p2p_wallet/Scenes/Main/Swap/SwapSettings/Info/ViewModel/SwapSettingsInfoViewModel.swift +++ b/p2p_wallet/Scenes/Main/Swap/SwapSettings/Info/ViewModel/SwapSettingsInfoViewModel.swift @@ -46,7 +46,7 @@ final class SwapSettingsInfoViewModel: BaseViewModel, ObservableObject { buttonTitle = L10n.okay + "👍" case .transferFee: image = .accountCreationFeeHand - title = L10n.transferFee + title = L10n.token2022TransferFee subtitle = L10n.ChargeThatYouNeedToPayToSendOrReceiveTokens2022 .itHelpsMaintainTheNetworkAndEnsureSmoothTransactions buttonTitle = L10n.gotIt + "👍" diff --git a/p2p_wallet/Scenes/Main/Swap/SwapSettings/View/SwapSettingsView.swift b/p2p_wallet/Scenes/Main/Swap/SwapSettings/View/SwapSettingsView.swift index 486ca15927..a2b44e5e0d 100644 --- a/p2p_wallet/Scenes/Main/Swap/SwapSettings/View/SwapSettingsView.swift +++ b/p2p_wallet/Scenes/Main/Swap/SwapSettings/View/SwapSettingsView.swift @@ -72,7 +72,7 @@ struct SwapSettingsView: View { ) if viewModel.info.transferFee != nil { - commonRow(title: L10n.transferFee, subtitle: viewModel.info.transferFee, identifier: .transferFee) + commonRow(title: L10n.token2022TransferFee, subtitle: viewModel.info.transferFee, identifier: .transferFee) } // Account creation fee From f150f926514e31a507d29952e2ae5b17e95e53c9 Mon Sep 17 00:00:00 2001 From: Elizaveta Semenova Date: Mon, 12 Feb 2024 16:43:39 +0300 Subject: [PATCH 3/6] [ETH-949] Include platform fee into liquidity fees --- .../Resources/Base.lproj/Localizable.strings | 2 +- .../Resources/en.lproj/Localizable.strings | 2 +- .../Main/Swap/State/JupiterSwapState.swift | 7 ++-- .../Coordinator/SwapSettingsCoordinator.swift | 35 +++++++++++-------- .../Model/SwapSettings+Models.swift | 16 ++++++--- .../SwapSettings/View/SwapSettingsView.swift | 16 ++------- 6 files changed, 39 insertions(+), 39 deletions(-) diff --git a/p2p_wallet/Resources/Base.lproj/Localizable.strings b/p2p_wallet/Resources/Base.lproj/Localizable.strings index 7a6830ff93..ab8f465ff0 100644 --- a/p2p_wallet/Resources/Base.lproj/Localizable.strings +++ b/p2p_wallet/Resources/Base.lproj/Localizable.strings @@ -606,7 +606,7 @@ "Based on absolute and relative profitability of each trade. It shows the relative potential %% profits or losses of your trading strategy." = "Based on absolute and relative profitability of each trade. It shows the relative potential %% profits or losses of your trading strategy."; "%@%% last 24h" = "%@%% last 24h"; "Result of an investment, trading strategy per 24 hours" = "Result of an investment, trading strategy per 24 hours"; -"KeyApp swap fee" = "KeyApp swap fee"; "Referral reward" = "Referral reward"; "Open SOLScan" = "Open SOLScan"; "Terms & Conditions" = "Terms & Conditions"; +"Swap fee" = "Swap fee"; diff --git a/p2p_wallet/Resources/en.lproj/Localizable.strings b/p2p_wallet/Resources/en.lproj/Localizable.strings index 9a8ea09533..01f07dd116 100644 --- a/p2p_wallet/Resources/en.lproj/Localizable.strings +++ b/p2p_wallet/Resources/en.lproj/Localizable.strings @@ -594,7 +594,7 @@ "Based on absolute and relative profitability of each trade. It shows the relative potential %% profits or losses of your trading strategy." = "Based on absolute and relative profitability of each trade. It shows the relative potential %% profits or losses of your trading strategy."; "%@%% last 24h" = "%@%% last 24h"; "Result of an investment, trading strategy per 24 hours" = "Result of an investment, trading strategy per 24 hours"; -"KeyApp swap fee" = "KeyApp swap fee"; "Referral reward" = "Referral reward"; "Open SOLScan" = "Open SOLScan"; "Terms & Conditions" = "Terms & Conditions"; +"Swap fee" = "Swap fee"; diff --git a/p2p_wallet/Scenes/Main/Swap/State/JupiterSwapState.swift b/p2p_wallet/Scenes/Main/Swap/State/JupiterSwapState.swift index 4e06046cae..0d65c3eedb 100644 --- a/p2p_wallet/Scenes/Main/Swap/State/JupiterSwapState.swift +++ b/p2p_wallet/Scenes/Main/Swap/State/JupiterSwapState.swift @@ -284,8 +284,8 @@ struct JupiterSwapState: Equatable { var liquidityFee: [SwapFeeInfo] { guard let route else { return [] } return route.routePlan - .map { ($0.swapInfo.feeAmount, $0.swapInfo.feeMint) } - .compactMap { feeAmount, feeMint -> SwapFeeInfo? in + .map { ($0.swapInfo.feeAmount, $0.swapInfo.feeMint, $0.percent) } + .compactMap { feeAmount, feeMint, percent -> SwapFeeInfo? in guard let token = swapTokens.map(\.token).first(where: { $0.mintAddress == feeMint }), let amount = UInt64(feeAmount)?.convertToBalance(decimals: token.decimals) else { @@ -297,8 +297,7 @@ struct JupiterSwapState: Equatable { tokenSymbol: token.symbol, tokenName: token.name, tokenPriceInCurrentFiat: tokensPriceMap[token.mintAddress], - // TODO(jupiter): Pct in v6 is not provided for each route plan. We have summarize value in response. - pct: 0, + pct: Decimal(percent), canBePaidByKeyApp: false ) } diff --git a/p2p_wallet/Scenes/Main/Swap/SwapSettings/Coordinator/SwapSettingsCoordinator.swift b/p2p_wallet/Scenes/Main/Swap/SwapSettings/Coordinator/SwapSettingsCoordinator.swift index a3c932b80b..f70def58c6 100644 --- a/p2p_wallet/Scenes/Main/Swap/SwapSettings/Coordinator/SwapSettingsCoordinator.swift +++ b/p2p_wallet/Scenes/Main/Swap/SwapSettings/Coordinator/SwapSettingsCoordinator.swift @@ -119,8 +119,6 @@ final class SwapSettingsCoordinator: Coordinator strategy = .accountCreationFee case .liquidityFee: strategy = .liquidityFee - case .platformFee: - return case .minimumReceived: strategy = .minimumReceived } @@ -174,17 +172,26 @@ private extension JupiterSwapState { return .loading } - return .loaded( - info.liquidityFee.map { lqFee in - SwapSettingsInfoViewModel.Fee( - title: L10n.liquidityFee( - lqFee.tokenName ?? L10n.unknownToken, - "\(lqFee.pct == nil ? L10n.unknown : "\(NSDecimalNumber(decimal: lqFee.pct!).doubleValue.toString(maximumFractionDigits: 9))")%" - ), - subtitle: lqFee.amount.tokenAmountFormattedString(symbol: lqFee.tokenSymbol ?? "UNKNOWN"), - amount: lqFee.amountInFiatDescription - ) - } - ) + var liquidutyFees = info.liquidityFee.map { lqFee in + SwapSettingsInfoViewModel.Fee( + title: L10n.liquidityFee( + lqFee.tokenName ?? L10n.unknownToken, + "\(lqFee.pct == nil ? L10n.unknown : "\(NSDecimalNumber(decimal: lqFee.pct!).doubleValue.toString(maximumFractionDigits: 9))")%" + ), + subtitle: lqFee.amount.tokenAmountFormattedString(symbol: lqFee.tokenSymbol ?? "UNKNOWN"), + amount: lqFee.amountInFiatDescription + ) + } + + if let platformFeeAmount = info.platformFee { + liquidutyFees.append(SwapSettingsInfoViewModel.Fee( + title: L10n.swapFee, + subtitle: platformFeeAmount.amount + .tokenAmountFormattedString(symbol: platformFeeAmount.tokenSymbol ?? "UNKNOWN"), + amount: platformFeeAmount.amountInFiatDescription + )) + } + + return .loaded(liquidutyFees) } } diff --git a/p2p_wallet/Scenes/Main/Swap/SwapSettings/Model/SwapSettings+Models.swift b/p2p_wallet/Scenes/Main/Swap/SwapSettings/Model/SwapSettings+Models.swift index f42011280d..78623d642d 100644 --- a/p2p_wallet/Scenes/Main/Swap/SwapSettings/Model/SwapSettings+Models.swift +++ b/p2p_wallet/Scenes/Main/Swap/SwapSettings/Model/SwapSettings+Models.swift @@ -22,15 +22,14 @@ struct JupiterSwapStateInfo: Equatable { let networkFee: SwapFeeInfo let accountCreationFee: SwapFeeInfo? let liquidityFee: [SwapFeeInfo] - let platformFee: PlatformFee? - let platformFeeAmount: SwapFeeInfo? + let platformFee: SwapFeeInfo? let minimumReceived: SwapTokenAmountInfo? let transferFee: String? let transferFeeFiat: Double? let exchangeRateInfo: String? var estimatedFees: String? { - var fees = (liquidityFee + [networkFee, accountCreationFee, platformFeeAmount] + var fees = (liquidityFee + [networkFee, accountCreationFee, platformFee] .compactMap { $0 }) .compactMap(\.amountInFiat) .reduce(0.0, +) @@ -40,6 +39,14 @@ struct JupiterSwapStateInfo: Equatable { return fees > 0 ? "≈ " + fees.formattedFiat() : nil } + + var displayableLiquidityFees: [SwapFeeInfo] { + var fees = liquidityFee + if let platformFee { + fees.append(platformFee) + } + return fees + } } // MARK: - Extensions @@ -75,8 +82,7 @@ extension JupiterSwapState { ), accountCreationFee: accountCreationFee, liquidityFee: liquidityFee, - platformFee: route?.platformFee, - platformFeeAmount: platformFeeAmount, + platformFee: platformFeeAmount, minimumReceived: minimumReceivedAmount == nil ? nil : .init( amount: minimumReceivedAmount!, token: toToken.token.symbol diff --git a/p2p_wallet/Scenes/Main/Swap/SwapSettings/View/SwapSettingsView.swift b/p2p_wallet/Scenes/Main/Swap/SwapSettings/View/SwapSettingsView.swift index a2b44e5e0d..9771e1656b 100644 --- a/p2p_wallet/Scenes/Main/Swap/SwapSettings/View/SwapSettingsView.swift +++ b/p2p_wallet/Scenes/Main/Swap/SwapSettings/View/SwapSettingsView.swift @@ -86,26 +86,15 @@ struct SwapSettingsView: View { // Liquidity fee if viewModel.isLoadingOrRouteNotNil { - if !viewModel.info.liquidityFee.isEmpty { + if !viewModel.info.displayableLiquidityFees.isEmpty { feeRow( title: L10n.liquidityFee, - fees: viewModel.info.liquidityFee, + fees: viewModel.info.displayableLiquidityFees, identifier: .liquidityFee ) } } - // Platform fee - if let platformFee = viewModel.info.platformFee { - commonRow( - title: L10n.keyAppSwapFee, - subtitle: nil, - trailingSubtitle: feeBpsFormatter(platformFee.feeBps), - trailingView: EmptyView().castToAnyView(), - identifier: .platformFee - ) - } - // Estimated fee if viewModel.isLoadingOrRouteNotNil, viewModel.info.estimatedFees != nil { HStack { @@ -322,7 +311,6 @@ extension SwapSettingsView { case transferFee case accountCreationFee case liquidityFee - case platformFee case minimumReceived } } From f6861dcbe42570ec408281744258ce527f34243c Mon Sep 17 00:00:00 2001 From: Elizaveta Semenova Date: Mon, 12 Feb 2024 20:58:41 +0300 Subject: [PATCH 4/6] [ETH-949] Remember account creation fee token choice --- .../SendInputBusinessLogic+ChangeToken.swift | 9 +++++++-- ...SendInputBusinessLogic+ChangeTokenFee.swift | 3 ++- .../Sources/Send/Input/SendInputState.swift | 18 +++++++++++++----- p2p_wallet/Common/Services/Defaults.swift | 3 +++ .../Services/Storage/UserWalletManager.swift | 1 + .../Main/Send/Input/SendInputViewModel.swift | 8 ++++++-- 6 files changed, 32 insertions(+), 10 deletions(-) diff --git a/Packages/KeyAppKit/Sources/Send/Input/SendInputBusinessLogic+ChangeToken.swift b/Packages/KeyAppKit/Sources/Send/Input/SendInputBusinessLogic+ChangeToken.swift index ed1aecc78a..e28a70e71a 100644 --- a/Packages/KeyAppKit/Sources/Send/Input/SendInputBusinessLogic+ChangeToken.swift +++ b/Packages/KeyAppKit/Sources/Send/Input/SendInputBusinessLogic+ChangeToken.swift @@ -68,7 +68,8 @@ extension SendInputBusinessLogic { feeInSol: state.fee, token: state.token, services: services, - whitelistMints: state.feePayableTokenMints + whitelistMints: state.feePayableTokenMints, + prechosenFeeTokenAddress: state.prechosenFeeTokenAddress ) state = state.copy( @@ -107,9 +108,13 @@ extension SendInputBusinessLogic { feeInSol: FeeAmount, token: SolanaAccount, services: SendInputServices, - whitelistMints: [String] + whitelistMints: [String], + prechosenFeeTokenAddress: String? ) async -> (token: SolanaAccount, fee: FeeAmount?) { var preferOrder = ["SOL": 2] + if let prechosenSymbol = userWallets.first(where: { $0.mintAddress == prechosenFeeTokenAddress })?.symbol { + preferOrder[prechosenSymbol] = 0 + } if !preferOrder.keys.contains(token.symbol) { preferOrder[token.symbol] = 1 } diff --git a/Packages/KeyAppKit/Sources/Send/Input/SendInputBusinessLogic+ChangeTokenFee.swift b/Packages/KeyAppKit/Sources/Send/Input/SendInputBusinessLogic+ChangeTokenFee.swift index 8c326e8f42..7781ca5e0b 100644 --- a/Packages/KeyAppKit/Sources/Send/Input/SendInputBusinessLogic+ChangeTokenFee.swift +++ b/Packages/KeyAppKit/Sources/Send/Input/SendInputBusinessLogic+ChangeTokenFee.swift @@ -33,7 +33,8 @@ extension SendInputBusinessLogic { let state = state.copy( fee: fee, tokenFee: feeToken, - feeInToken: feeInToken + feeInToken: feeInToken, + prechosenFeeTokenAddress: feeToken.mintAddress ) return await validateFee(state: state) diff --git a/Packages/KeyAppKit/Sources/Send/Input/SendInputState.swift b/Packages/KeyAppKit/Sources/Send/Input/SendInputState.swift index b805e61a4b..9c3b36afac 100644 --- a/Packages/KeyAppKit/Sources/Send/Input/SendInputState.swift +++ b/Packages/KeyAppKit/Sources/Send/Input/SendInputState.swift @@ -122,6 +122,8 @@ public struct SendInputState: Equatable { sendViaLinkSeed != nil } + public let prechosenFeeTokenAddress: String? + public init( status: Status, recipient: Recipient, @@ -138,7 +140,8 @@ public struct SendInputState: Equatable { lamportsPerSignature: UInt64, minimumRelayAccountBalance: UInt64, limit: SendServiceLimitResponse, - sendViaLinkSeed: String? + sendViaLinkSeed: String?, + prechosenFeeTokenAddress: String? ) { self.status = status self.recipient = recipient @@ -156,6 +159,7 @@ public struct SendInputState: Equatable { self.minimumRelayAccountBalance = minimumRelayAccountBalance self.limit = limit self.sendViaLinkSeed = sendViaLinkSeed + self.prechosenFeeTokenAddress = prechosenFeeTokenAddress } public static func zero( @@ -166,7 +170,8 @@ public struct SendInputState: Equatable { feeToken: SolanaAccount, userWalletState: UserWalletEnvironments, feePayableTokenMints: [String] = [], - sendViaLinkSeed: String? + sendViaLinkSeed: String?, + prechosenFeeTokenAddress: String? ) -> SendInputState { .init( status: status, @@ -190,7 +195,8 @@ public struct SendInputState: Equatable { ), tokenAccountRent: .init(remainingAmount: 0, remainingTransactions: 0) ), - sendViaLinkSeed: sendViaLinkSeed + sendViaLinkSeed: sendViaLinkSeed, + prechosenFeeTokenAddress: prechosenFeeTokenAddress ) } @@ -210,7 +216,8 @@ public struct SendInputState: Equatable { lamportsPerSignature: UInt64? = nil, minimumRelayAccountBalance: UInt64? = nil, limit: SendServiceLimitResponse? = nil, - sendViaLinkSeed: String?? = nil + sendViaLinkSeed: String?? = nil, + prechosenFeeTokenAddress: String?? = nil ) -> SendInputState { .init( status: status ?? self.status, @@ -229,7 +236,8 @@ public struct SendInputState: Equatable { lamportsPerSignature: lamportsPerSignature ?? self.lamportsPerSignature, minimumRelayAccountBalance: minimumRelayAccountBalance ?? self.minimumRelayAccountBalance, limit: limit ?? self.limit, - sendViaLinkSeed: sendViaLinkSeed ?? self.sendViaLinkSeed + sendViaLinkSeed: sendViaLinkSeed ?? self.sendViaLinkSeed, + prechosenFeeTokenAddress: prechosenFeeTokenAddress ?? self.prechosenFeeTokenAddress ) } } diff --git a/p2p_wallet/Common/Services/Defaults.swift b/p2p_wallet/Common/Services/Defaults.swift index ae83f98b45..a8a062e442 100644 --- a/p2p_wallet/Common/Services/Defaults.swift +++ b/p2p_wallet/Common/Services/Defaults.swift @@ -67,6 +67,9 @@ extension DefaultsKeys { // Send var isTokenInputTypeChosen: DefaultsKey { .init(#function, defaultValue: false) } + var accountCreationLastTokenAddress: DefaultsKey { + .init(#function, defaultValue: nil) + } var solanaNegativeStatusFrequency: DefaultsKey { .init( diff --git a/p2p_wallet/Common/Services/Storage/UserWalletManager.swift b/p2p_wallet/Common/Services/Storage/UserWalletManager.swift index 7584823177..c7f4024f55 100644 --- a/p2p_wallet/Common/Services/Storage/UserWalletManager.swift +++ b/p2p_wallet/Common/Services/Storage/UserWalletManager.swift @@ -103,6 +103,7 @@ class UserWalletManager: ObservableObject { Defaults.ethBannerShouldHide = false Defaults.isSellInfoPresented = false Defaults.isTokenInputTypeChosen = false + Defaults.accountCreationLastTokenAddress = nil Defaults.fromTokenAddress = nil Defaults.toTokenAddress = nil Defaults.referrerRegistered = false diff --git a/p2p_wallet/Scenes/Main/Send/Input/SendInputViewModel.swift b/p2p_wallet/Scenes/Main/Send/Input/SendInputViewModel.swift index 01ed323311..e3f9e21f4c 100644 --- a/p2p_wallet/Scenes/Main/Send/Input/SendInputViewModel.swift +++ b/p2p_wallet/Scenes/Main/Send/Input/SendInputViewModel.swift @@ -134,7 +134,9 @@ final class SendInputViewModel: BaseViewModel, ObservableObject { sourceWallet = tokenInWallet let feeTokenInWallet = wallets - .first(where: { $0.token.mintAddress == TokenMetadata.usdc.mintAddress }) ?? + .first(where: { + $0.token.mintAddress == Defaults.accountCreationLastTokenAddress ?? TokenMetadata.usdc.mintAddress + }) ?? .classicSPLTokenAccount(address: "", lamports: 0, token: .usdc) var exchangeRate = [String: TokenPrice]() @@ -156,7 +158,8 @@ final class SendInputViewModel: BaseViewModel, ObservableObject { token: tokenInWallet, feeToken: feeTokenInWallet, userWalletState: env, - sendViaLinkSeed: sendViaLinkSeed + sendViaLinkSeed: sendViaLinkSeed, + prechosenFeeTokenAddress: Defaults.accountCreationLastTokenAddress ) stateMachine = .init( @@ -362,6 +365,7 @@ private extension SendInputViewModel { self.isFeeLoading = true _ = await self.stateMachine.accept(action: .changeFeeToken(newFeeToken)) self.isFeeLoading = false + Defaults.accountCreationLastTokenAddress = newFeeToken.mintAddress } .store(in: &subscriptions) From 2f906db03efa02609d142aa86edb39a85e100998 Mon Sep 17 00:00:00 2001 From: runner Date: Mon, 12 Feb 2024 17:59:33 +0000 Subject: [PATCH 5/6] fix(swiftformat): Apply Swiftformat changes --- .../Main/Swap/SwapSettings/View/SwapSettingsView.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/p2p_wallet/Scenes/Main/Swap/SwapSettings/View/SwapSettingsView.swift b/p2p_wallet/Scenes/Main/Swap/SwapSettings/View/SwapSettingsView.swift index 9771e1656b..5020da91b9 100644 --- a/p2p_wallet/Scenes/Main/Swap/SwapSettings/View/SwapSettingsView.swift +++ b/p2p_wallet/Scenes/Main/Swap/SwapSettings/View/SwapSettingsView.swift @@ -72,7 +72,11 @@ struct SwapSettingsView: View { ) if viewModel.info.transferFee != nil { - commonRow(title: L10n.token2022TransferFee, subtitle: viewModel.info.transferFee, identifier: .transferFee) + commonRow( + title: L10n.token2022TransferFee, + subtitle: viewModel.info.transferFee, + identifier: .transferFee + ) } // Account creation fee From dff2c637e9134d2874b23a7defa10f72edad605a Mon Sep 17 00:00:00 2001 From: Elizaveta Semenova Date: Mon, 12 Feb 2024 21:15:58 +0300 Subject: [PATCH 6/6] [ETH-780] Referral reward history item --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- .../Model/RendableDetailTransaction+HistoryTransaction.swift | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/p2p_wallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/p2p_wallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 0b06043ec5..053ab2d035 100644 --- a/p2p_wallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/p2p_wallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -185,8 +185,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/onevcat/Kingfisher.git", "state" : { - "revision" : "3ec0ab0bca4feb56e8b33e289c9496e89059dd08", - "version" : "7.10.2" + "revision" : "5b92f029fab2cce44386d28588098b5be0824ef5", + "version" : "7.11.0" } }, { diff --git a/p2p_wallet/Scenes/Main/TransactionDetailView/Model/RendableDetailTransaction+HistoryTransaction.swift b/p2p_wallet/Scenes/Main/TransactionDetailView/Model/RendableDetailTransaction+HistoryTransaction.swift index e69da3c074..64fbf92c52 100644 --- a/p2p_wallet/Scenes/Main/TransactionDetailView/Model/RendableDetailTransaction+HistoryTransaction.swift +++ b/p2p_wallet/Scenes/Main/TransactionDetailView/Model/RendableDetailTransaction+HistoryTransaction.swift @@ -325,6 +325,7 @@ struct RendableDetailHistoryTransaction: RenderableTransactionDetail { values: [.init(text: value)] ) ) + return result // Do not show trx.fees after this switch case for this type of transaction default: result.append(