Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

631 Add feature toggle for storage alert feature #639

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FRW/Services/Manager/Config/RemoteConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ extension RemoteConfigManager {
return true
case .insufficientStorage:
// TODO: [AB] Not very elegant adding a dependency here, but implementing in a different way would probably require major refactoring
return WalletManager.shared.isStorageInsufficient && RemoteConfigManager.shared.config?.features.insufficientStorage ?? true
return WalletManager.shared.isStorageInsufficient && RemoteConfigManager.shared.config?.features.insufficientStorage ?? false
default:
return false
}
Expand Down
2 changes: 1 addition & 1 deletion FRW/Services/Manager/TransactionManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ extension TransactionManager {

switch result.errorCode {
case .storageCapacityExceeded:
if RemoteConfigManager.shared.config?.features.insufficientStorage ?? true {
if RemoteConfigManager.shared.config?.features.insufficientStorage ?? false {
AlertViewController.showInsufficientStorageError(minimumBalance: WalletManager.shared.minimumStorageBalance.doubleValue)
}
default:
Expand Down
2 changes: 1 addition & 1 deletion FRW/UI/Component/InsufficientStorageToastView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protocol InsufficientStorageToastViewModel: ObservableObject {
}

extension InsufficientStorageToastViewModel {
private var isInsufficientStorageEnabled: Bool { RemoteConfigManager.shared.config?.features.insufficientStorage ?? true }
private var isInsufficientStorageEnabled: Bool { RemoteConfigManager.shared.config?.features.insufficientStorage ?? false }

var showInsufficientFundsToast: Bool {
self.isInsufficientStorageEnabled && self.variant != nil
Expand Down