From e02d68817935d4e5e0833231bfa27dcdf714ffb9 Mon Sep 17 00:00:00 2001 From: TD Date: Fri, 17 Nov 2023 12:04:27 +0100 Subject: [PATCH] fix CBW-1528 and CBW-1529 --- .../ComissionSettings/BakerCommissionSettingsView.swift | 8 +------- .../BakerCommissionSettingsViewModel.swift | 7 ------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/ConcordiumWallet/Views/Stake/Baking/ComissionSettings/BakerCommissionSettingsView.swift b/ConcordiumWallet/Views/Stake/Baking/ComissionSettings/BakerCommissionSettingsView.swift index 83e25240..431b4757 100644 --- a/ConcordiumWallet/Views/Stake/Baking/ComissionSettings/BakerCommissionSettingsView.swift +++ b/ConcordiumWallet/Views/Stake/Baking/ComissionSettings/BakerCommissionSettingsView.swift @@ -25,17 +25,11 @@ struct BakerCommissionSettingsView: View { commission: $viewModel.transactionFeeCommission ) - Text("Baking reward commission") + Text("Block reward commission") BakerCommissionSliderView( range: ranges.bakingCommissionRange, commission: $viewModel.bakingRewardCommission ) - - Text("Finalization reward commission") - BakerCommissionSliderView( - range: ranges.finalizationCommissionRange, - commission: $viewModel.finalizationRewardCommission - ) Spacer() Button(action: viewModel.continueButtonTapped) { Text("Continue") diff --git a/ConcordiumWallet/Views/Stake/Baking/ComissionSettings/BakerCommissionSettingsViewModel.swift b/ConcordiumWallet/Views/Stake/Baking/ComissionSettings/BakerCommissionSettingsViewModel.swift index b1459315..74d9b8eb 100644 --- a/ConcordiumWallet/Views/Stake/Baking/ComissionSettings/BakerCommissionSettingsViewModel.swift +++ b/ConcordiumWallet/Views/Stake/Baking/ComissionSettings/BakerCommissionSettingsViewModel.swift @@ -22,15 +22,12 @@ extension NumberFormatter { enum BakerCommissionSettingError: LocalizedError { case transactionFeeOutOfRange case bakingRewardOutOfRange - case finalizationRewardOutOfRange case networkError(Error) var errorMessage: String { switch self { case .bakingRewardOutOfRange: return "Baking reward is out of specified range" - case .finalizationRewardOutOfRange: - return "Finalization reward is out of specified range" case .transactionFeeOutOfRange: return "Transaction fee is out of specified range" case let .networkError(error): @@ -137,10 +134,6 @@ class BakerCommissionSettingsViewModel: ObservableObject { return BakerCommissionSettingError.bakingRewardOutOfRange } - guard ranges.finalizationCommissionRange.min ... ranges.finalizationCommissionRange.max ~= finalizationRewardCommission else { - return BakerCommissionSettingError.finalizationRewardOutOfRange - } - guard ranges.transactionCommissionRange.min ... ranges.transactionCommissionRange.max ~= transactionFeeCommission else { return BakerCommissionSettingError.transactionFeeOutOfRange }