From fa80d09cde37392622cfb6bd89765b4da20b94e1 Mon Sep 17 00:00:00 2001 From: Nuo Xu Date: Tue, 10 Dec 2024 10:38:56 -0500 Subject: [PATCH] fix format --- .../Stores/TransactionConfirmationStore.swift | 14 +++++++------- .../Crypto/Stores/TransactionStatusStore.swift | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ios/brave-ios/Sources/BraveWallet/Crypto/Stores/TransactionConfirmationStore.swift b/ios/brave-ios/Sources/BraveWallet/Crypto/Stores/TransactionConfirmationStore.swift index 1dbc720ba4c7..0b0b15e8af0c 100644 --- a/ios/brave-ios/Sources/BraveWallet/Crypto/Stores/TransactionConfirmationStore.swift +++ b/ios/brave-ios/Sources/BraveWallet/Crypto/Stores/TransactionConfirmationStore.swift @@ -375,7 +375,8 @@ public class TransactionConfirmationStore: ObservableObject, WalletObserverStore else { return nil } let allTokens = - await blockchainRegistry.allTokens(chainId: network.chainId, coin: txInfo.coin) + tokenInfoCache + await blockchainRegistry.allTokens(chainId: network.chainId, coin: txInfo.coin) + + tokenInfoCache let userAssets = await assetManager.getAllUserAssetsInNetworkAssets( networks: [network], includingUserDeleted: true @@ -396,16 +397,15 @@ public class TransactionConfirmationStore: ObservableObject, WalletObserverStore var followUpAction = TransactionStatusStore.FollowUpAction.none if case .ethSend(let detail) = activeParsedTransaction.details, let fromValue = BDouble(detail.fromAmount), - fromValue == 0, activeTransaction.ethTxData.isEmpty + fromValue == 0, activeTransaction.ethTxData.isEmpty { // loop through allTx to find if there is a tx that has the same chain id, coin type, nonce and from address // maxFeePerGas/gasPrice is smaller than this active tx if let txInfo = allTxs.first(where: { - $0.id != activeTransaction.id && - $0.coin == activeTransaction.coin && - $0.chainId == activeTransaction.chainId && - $0.ethTxNonce == activeTransaction.ethTxNonce && - $0.fromAddress == activeTransaction.fromAddress + $0.id != activeTransaction.id && $0.coin == activeTransaction.coin + && $0.chainId == activeTransaction.chainId + && $0.ethTxNonce == activeTransaction.ethTxNonce + && $0.fromAddress == activeTransaction.fromAddress }), let parsedTx = await parseTransaction(txInfo) { followUpAction = .cancel(toCancelParsedTx: parsedTx) } diff --git a/ios/brave-ios/Sources/BraveWallet/Crypto/Stores/TransactionStatusStore.swift b/ios/brave-ios/Sources/BraveWallet/Crypto/Stores/TransactionStatusStore.swift index 97b464acc23d..8021f79bd3a8 100644 --- a/ios/brave-ios/Sources/BraveWallet/Crypto/Stores/TransactionStatusStore.swift +++ b/ios/brave-ios/Sources/BraveWallet/Crypto/Stores/TransactionStatusStore.swift @@ -82,7 +82,7 @@ public class TransactionStatusStore: ObservableObject, WalletObserverStore { self.txServiceObserver = TxServiceObserver( txService: txService, _onNewUnapprovedTx: { _ in - // tx speed up and cancellation will be handled inside `TxConfirmationStore` + // tx speed up and cancellation will be handled inside `TxConfirmationStore` }, _onUnapprovedTxUpdated: { _ in // should only handle tx speed up and tx cancellation