From 788679967c5dcb9c55dc9d104ac6720c2cd734a4 Mon Sep 17 00:00:00 2001 From: kcw-grunt Date: Wed, 3 Apr 2024 11:41:23 +0100 Subject: [PATCH] resolved conflict resolution errors Signed-off-by: kcw-grunt --- litewallet/AppDelegate.swift | 2 +- litewallet/ApplicationController.swift | 1 - litewallet/Constants/Functions.swift | 1 - litewallet/PartnerData.swift | 4 ++-- litewallet/TransactionCellViewModel.swift | 4 ++-- .../ViewControllers/RootModals/SendViewController.swift | 2 -- litewallet/ViewModels/Transaction.swift | 3 +-- 7 files changed, 6 insertions(+), 11 deletions(-) diff --git a/litewallet/AppDelegate.swift b/litewallet/AppDelegate.swift index 28796f45..0b73d33b 100644 --- a/litewallet/AppDelegate.swift +++ b/litewallet/AppDelegate.swift @@ -48,7 +48,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { LWAnalytics.logEventWithParameters(itemName: ._20200112_ERR, properties: properties) } - + updateCurrentUserLocale(localeId: Locale.current.identifier) guard let thisWindow = window else { return false } diff --git a/litewallet/ApplicationController.swift b/litewallet/ApplicationController.swift index 68cac401..824d4d09 100644 --- a/litewallet/ApplicationController.swift +++ b/litewallet/ApplicationController.swift @@ -223,7 +223,6 @@ class ApplicationController: Subscriber, Trackable { } private func startDataFetchers() { - initKVStoreCoordinator() feeUpdater?.refresh() defaultsUpdater?.refresh() diff --git a/litewallet/Constants/Functions.swift b/litewallet/Constants/Functions.swift index f49f81d8..4a89abb5 100644 --- a/litewallet/Constants/Functions.swift +++ b/litewallet/Constants/Functions.swift @@ -64,6 +64,5 @@ func tieredOpsFee(store: Store, amount: UInt64) -> UInt64 { return UInt64(3.00 / usdRate * 100_000_000) default: return UInt64(3.00 / usdRate * 100_000_000) - } } diff --git a/litewallet/PartnerData.swift b/litewallet/PartnerData.swift index c4a27e8a..c867dc89 100644 --- a/litewallet/PartnerData.swift +++ b/litewallet/PartnerData.swift @@ -35,6 +35,7 @@ struct Partner { guard let releasePath = Bundle.main.path(forResource: "partner-keys", ofType: "plist") else { + let errorDescription = "partnerkey_data_missing" LWAnalytics.logEventWithParameters(itemName: ._20200112_ERR, properties: ["error": errorDescription]) return "error: FILE-NOT-FOUND" } @@ -85,7 +86,6 @@ struct Partner { { return key } else { - let errorDescription = "error_pusher_id_key" LWAnalytics.logEventWithParameters(itemName: ._20200112_ERR, properties: ["error": errorDescription]) return errorDescription @@ -98,7 +98,7 @@ struct Partner { { return key } else { - let errorDescription = "error_pusher_id_key" + let errorDescription = "error_pusher_id_key" LWAnalytics.logEventWithParameters(itemName: ._20200112_ERR, properties: ["error": errorDescription]) return errorDescription diff --git a/litewallet/TransactionCellViewModel.swift b/litewallet/TransactionCellViewModel.swift index c6c21678..ca9e88ee 100644 --- a/litewallet/TransactionCellViewModel.swift +++ b/litewallet/TransactionCellViewModel.swift @@ -74,8 +74,8 @@ class TransactionCellViewModel: ObservableObject { amountText = transaction.descriptionString(isLtcSwapped: isLtcSwapped, rate: rate, maxDigits: maxDigits).string feeText = transaction.amountDetails(isLtcSwapped: isLtcSwapped, rate: rate, rates: [rate], maxDigits: maxDigits) - - addressText = String(format: transaction.direction.addressTextFormat, transaction.toAddress ?? "---ERROR---") + + addressText = String(format: transaction.direction.addressTextFormat, transaction.toAddress ?? "---ERROR---") if transaction.direction == .sent { directionImageText = "arrowtriangle.up.circle.fill" diff --git a/litewallet/ViewControllers/RootModals/SendViewController.swift b/litewallet/ViewControllers/RootModals/SendViewController.swift index 7082a2d2..cbbc4a6e 100644 --- a/litewallet/ViewControllers/RootModals/SendViewController.swift +++ b/litewallet/ViewControllers/RootModals/SendViewController.swift @@ -195,7 +195,6 @@ class SendViewController: UIViewController, Subscriber, ModalPresentable, Tracka // MARK: - SendButton Model Callbacks / Actions sendButtonCell.rootView.doSendTransaction = { - if let sendAddress = self.sendAddressCell.address, sendAddress.isValidAddress { @@ -232,7 +231,6 @@ class SendViewController: UIViewController, Subscriber, ModalPresentable, Tracka var combinedFeesOutput = "" var balanceColor: UIColor = .grayTextTint -< /// Check the amount is greater than zero and amount satoshis are not nil if let currentRate = currentRate, let enteredAmount = enteredAmount, diff --git a/litewallet/ViewModels/Transaction.swift b/litewallet/ViewModels/Transaction.swift index 88b63c92..0478effe 100644 --- a/litewallet/ViewModels/Transaction.swift +++ b/litewallet/ViewModels/Transaction.swift @@ -12,7 +12,6 @@ struct TransactionStatusTuple { class Transaction { // MARK: - Public - private let opsAddressSet: Set = Partner.litewalletOpsSet() init?(_ tx: BRTxRef, walletManager: WalletManager, kvStore: BRReplicatedKVStore?, rate: Rate?) { guard let wallet = walletManager.wallet else { return nil } @@ -21,7 +20,7 @@ class Transaction { self.tx = tx self.wallet = wallet self.kvStore = kvStore - + let fee = wallet.feeForTx(tx) ?? 0 var outputAddresses = Set()