diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/SendNew/EvmFeeEstimator.swift b/UnstoppableWallet/UnstoppableWallet/Modules/SendNew/EvmFeeEstimator.swift index 8854f79333..264027410a 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/SendNew/EvmFeeEstimator.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/SendNew/EvmFeeEstimator.swift @@ -49,7 +49,7 @@ struct EvmFeeEstimator { return .init(gasLimit: gasLimit, surchargedGasLimit: surchargedGasLimit, l1Fee: l1Fee) } - func estimateFee(evmKitWrapper: EvmKitWrapper, transactionData: TransactionData, gasPriceData: GasPriceData, predefinedGasLimit: Int? = nil) async throws -> EvmFeeData { + func estimateFee(evmKitWrapper: EvmKitWrapper, transactionData: TransactionData, gasPriceData: GasPriceData, predefinedGasLimit _: Int? = nil) async throws -> EvmFeeData { do { return try await _estimateFee(evmKitWrapper: evmKitWrapper, transactionData: transactionData, gasPrice: gasPriceData.userDefined) } catch { diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/SendNew/OutputSelectView2.swift b/UnstoppableWallet/UnstoppableWallet/Modules/SendNew/OutputSelectView2.swift index 2f471198ac..7b3eb7fa67 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/SendNew/OutputSelectView2.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/SendNew/OutputSelectView2.swift @@ -10,8 +10,8 @@ struct OutputSelectorView2: View { } var body: some View { - ScrollableThemeView { - VStack(spacing: 0) { + ThemeView { + VStack { ListSection { ListRow(minHeight: .heightDoubleLineCell) { HStack(spacing: .margin8) { @@ -32,27 +32,34 @@ struct OutputSelectorView2: View { } .padding(EdgeInsets(top: .margin12, leading: .margin16, bottom: .margin12, trailing: .margin16)) - ListSection { - ListRow { - HStack(spacing: 0) { - Button(action: { - viewModel.selectUnselectAll() - }) { - Text(viewModel.allSelected ? "send.unselect_all".localized : "send.select_all".localized) - } - .buttonStyle(SecondaryButtonStyle()) + ScrollView { + ListSection { + ForEach(viewModel.outputsViewItems) { viewItem in + output(viewItem: viewItem) } + } + .themeListStyle(.transparent) + } + + HorizontalDivider(color: .themeSteel10, height: .heightOneDp) - Spacer() + HStack { + Button(action: { + viewModel.unselectAll() + }) { + Text("send.unselect_all".localized).themeBody(color: viewModel.selectedSet.isEmpty ? .themeGray50 : .themeJacob) } - ForEach(viewModel.outputsViewItems) { viewItem in - output(viewItem: viewItem) + Spacer() + + Button(action: { + viewModel.selectAll() + }) { + Text("send.select_all".localized).themeBody(color: viewModel.allSelected ? .themeGray50 : .themeJacob, alignment: .trailing) } } - .themeListStyle(.transparent) + .padding(EdgeInsets(top: .margin12, leading: .margin16, bottom: CGFloat(43), trailing: .margin16)) } - .padding(EdgeInsets(top: .margin12, leading: 0, bottom: .margin32, trailing: 0)) } .navigationTitle("send.unspent_outputs".localized) .navigationBarTitleDisplayMode(.inline) diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/SendNew/OutputSelectorViewModel2.swift b/UnstoppableWallet/UnstoppableWallet/Modules/SendNew/OutputSelectorViewModel2.swift index 76d668424d..126f38509e 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/SendNew/OutputSelectorViewModel2.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/SendNew/OutputSelectorViewModel2.swift @@ -95,13 +95,13 @@ extension OutputSelectorViewModel2 { sync() } - func selectUnselectAll() { - if allSelected { - handler.customUtxos = [] - } else { - handler.customUtxos = handler.allUtxos - } + func unselectAll() { + handler.customUtxos = [] + sync() + } + func selectAll() { + handler.customUtxos = handler.allUtxos sync() }