diff --git a/RadixWallet/Core/FeaturePrelude/SlideUpPanel/SlideUpPanel+View.swift b/RadixWallet/Core/FeaturePrelude/SlideUpPanel/SlideUpPanel+View.swift index 492d8352c7..c211da5569 100644 --- a/RadixWallet/Core/FeaturePrelude/SlideUpPanel/SlideUpPanel+View.swift +++ b/RadixWallet/Core/FeaturePrelude/SlideUpPanel/SlideUpPanel+View.swift @@ -10,28 +10,23 @@ extension SlideUpPanel.State { // MARK: - WithNavigationBar public struct WithNavigationBar: View { - private let closeButtonLocation: ToolbarItemPlacement private let closeAction: () -> Void private let content: Content public init( - _ closeButtonLocation: ToolbarItemPlacement = .primaryAction, closeAction: @escaping () -> Void, @ViewBuilder content: () -> Content ) { self.init( - closeButtonLocation, closeAction: closeAction, content: content() ) } init( - _ closeButtonLocation: ToolbarItemPlacement = .primaryAction, closeAction: @escaping () -> Void, content: Content ) { - self.closeButtonLocation = closeButtonLocation self.content = content self.closeAction = closeAction } @@ -41,7 +36,7 @@ public struct WithNavigationBar: View { content .presentationDragIndicator(.visible) .toolbar { - ToolbarItem(placement: closeButtonLocation) { + ToolbarItem(placement: .cancellationAction) { CloseButton(action: closeAction) } } @@ -64,10 +59,9 @@ extension View { } public func withNavigationBar( - _ closeButtonLocation: ToolbarItemPlacement = .primaryAction, closeAction: @escaping () -> Void ) -> some View { - WithNavigationBar(closeButtonLocation, closeAction: closeAction, content: self) + WithNavigationBar(closeAction: closeAction, content: self) } } diff --git a/RadixWallet/Features/AccountPreferencesFeature/Children/DevAccountPreferences+View.swift b/RadixWallet/Features/AccountPreferencesFeature/Children/DevAccountPreferences+View.swift index d603e19e8e..f08f0d14bc 100644 --- a/RadixWallet/Features/AccountPreferencesFeature/Children/DevAccountPreferences+View.swift +++ b/RadixWallet/Features/AccountPreferencesFeature/Children/DevAccountPreferences+View.swift @@ -114,7 +114,7 @@ private extension View { return sheet(store: destinationStore.scope(state: \.reviewTransaction, action: \.reviewTransaction)) { // FIXME: Should use DappInteractionClient instead to schedule a transaction TransactionReview.View(store: $0) - .withNavigationBar(.topBarLeading) { + .withNavigationBar { store.send(.view(.closeTransactionButtonTapped)) } } diff --git a/RadixWallet/Features/AccountRecoveryScan/Children/AccountRecoveryScanInProgress/AccountRecoveryScanInProgress+View.swift b/RadixWallet/Features/AccountRecoveryScan/Children/AccountRecoveryScanInProgress/AccountRecoveryScanInProgress+View.swift index 7039871eec..fba7294075 100644 --- a/RadixWallet/Features/AccountRecoveryScan/Children/AccountRecoveryScanInProgress/AccountRecoveryScanInProgress+View.swift +++ b/RadixWallet/Features/AccountRecoveryScan/Children/AccountRecoveryScanInProgress/AccountRecoveryScanInProgress+View.swift @@ -89,7 +89,7 @@ public extension AccountRecoveryScanInProgress { } .toolbar { if viewStore.showToolbar { - ToolbarItem(placement: .automatic) { + ToolbarItem(placement: .cancellationAction) { CloseButton { store.send(.view(.closeButtonTapped)) } diff --git a/RadixWallet/Features/AddLedgerFactorSource/AddLedgerFactorSource+View.swift b/RadixWallet/Features/AddLedgerFactorSource/AddLedgerFactorSource+View.swift index 99507ae31c..2beb99f4a8 100644 --- a/RadixWallet/Features/AddLedgerFactorSource/AddLedgerFactorSource+View.swift +++ b/RadixWallet/Features/AddLedgerFactorSource/AddLedgerFactorSource+View.swift @@ -41,7 +41,7 @@ extension AddLedgerFactorSource { .padding(.bottom, .large2) } .toolbar { - ToolbarItem(placement: .primaryAction) { + ToolbarItem(placement: .cancellationAction) { CloseButton { viewStore.send(.closeButtonTapped) } diff --git a/RadixWallet/Features/AssetsFeature/Components/DetailsContainerWithHeaderView.swift b/RadixWallet/Features/AssetsFeature/Components/DetailsContainerWithHeaderView.swift index 577ef4152d..240a38bf9e 100644 --- a/RadixWallet/Features/AssetsFeature/Components/DetailsContainerWithHeaderView.swift +++ b/RadixWallet/Features/AssetsFeature/Components/DetailsContainerWithHeaderView.swift @@ -108,7 +108,7 @@ struct DetailsContainer: View { .navigationBarTitleDisplayMode(.inline) .navigationBarInlineTitleFont(.app.secondaryHeader) .toolbar { - ToolbarItem(placement: .primaryAction) { + ToolbarItem(placement: .cancellationAction) { CloseButton(action: closeButtonAction) } } diff --git a/RadixWallet/Features/CreateAccount/Coordinator/CreateAccountCoordinator+View.swift b/RadixWallet/Features/CreateAccount/Coordinator/CreateAccountCoordinator+View.swift index 8ee4263c50..69dfd71968 100644 --- a/RadixWallet/Features/CreateAccount/Coordinator/CreateAccountCoordinator+View.swift +++ b/RadixWallet/Features/CreateAccount/Coordinator/CreateAccountCoordinator+View.swift @@ -32,7 +32,7 @@ extension CreateAccountCoordinator { destinations(for: $0, shouldDisplayNavBar: viewStore.shouldDisplayNavBar) .toolbar { if viewStore.shouldDisplayNavBar { - ToolbarItem(placement: .primaryAction) { + ToolbarItem(placement: .cancellationAction) { CloseButton { store.send(.view(.closeButtonTapped)) } diff --git a/RadixWallet/Features/EditPersonaFeature/EditPersona+View.swift b/RadixWallet/Features/EditPersonaFeature/EditPersona+View.swift index 2c7e661e95..458e78cb57 100644 --- a/RadixWallet/Features/EditPersonaFeature/EditPersona+View.swift +++ b/RadixWallet/Features/EditPersonaFeature/EditPersona+View.swift @@ -95,7 +95,7 @@ extension EditPersona { .navigationTitle(viewStore.personaLabel) .navigationBarTitleDisplayMode(.inline) .toolbar { - ToolbarItem(placement: .primaryAction) { + ToolbarItem(placement: .cancellationAction) { CloseButton { viewStore.send(.closeButtonTapped) } } } diff --git a/RadixWallet/Features/EditPersonaFeature/EditPersonaAddEntryKinds+View.swift b/RadixWallet/Features/EditPersonaFeature/EditPersonaAddEntryKinds+View.swift index 3967dd3d66..36e1dc90de 100644 --- a/RadixWallet/Features/EditPersonaFeature/EditPersonaAddEntryKinds+View.swift +++ b/RadixWallet/Features/EditPersonaFeature/EditPersonaAddEntryKinds+View.swift @@ -48,7 +48,7 @@ extension EditPersonaAddEntryKinds { .navigationBarTitleDisplayMode(.inline) .navigationBarInlineTitleFont(.app.secondaryHeader) .toolbar { - ToolbarItem(placement: .primaryAction) { + ToolbarItem(placement: .cancellationAction) { CloseButton(action: { viewStore.send(.closeButtonTapped) }) } } diff --git a/RadixWallet/Features/NewConnectionFeature/Coordinator/NewConnection+View.swift b/RadixWallet/Features/NewConnectionFeature/Coordinator/NewConnection+View.swift index 4f0c8d920e..552af2cbc9 100644 --- a/RadixWallet/Features/NewConnectionFeature/Coordinator/NewConnection+View.swift +++ b/RadixWallet/Features/NewConnectionFeature/Coordinator/NewConnection+View.swift @@ -44,7 +44,7 @@ extension NewConnection { } } .toolbar { - ToolbarItem(placement: .primaryAction) { + ToolbarItem(placement: .cancellationAction) { CloseButton { store.send(.view(.closeButtonTapped)) } diff --git a/RadixWallet/Features/ProfileBackupsFeature/RestoreProfileFromBackup/Children/ImportSeedPhrasesFlow/ConfirmSkippingBDFS/ConfirmSkippingBDFS+View.swift b/RadixWallet/Features/ProfileBackupsFeature/RestoreProfileFromBackup/Children/ImportSeedPhrasesFlow/ConfirmSkippingBDFS/ConfirmSkippingBDFS+View.swift index ae7b183c6f..0a74405266 100644 --- a/RadixWallet/Features/ProfileBackupsFeature/RestoreProfileFromBackup/Children/ImportSeedPhrasesFlow/ConfirmSkippingBDFS/ConfirmSkippingBDFS+View.swift +++ b/RadixWallet/Features/ProfileBackupsFeature/RestoreProfileFromBackup/Children/ImportSeedPhrasesFlow/ConfirmSkippingBDFS/ConfirmSkippingBDFS+View.swift @@ -33,7 +33,7 @@ extension ConfirmSkippingBDFS { .padding(.bottom, .medium2) } .toolbar { - ToolbarItem(placement: .primaryAction) { + ToolbarItem(placement: .cancellationAction) { CloseButton { store.send(.view(.closeButtonTapped)) } diff --git a/RadixWallet/Features/ProfileBackupsFeature/RestoreProfileFromBackup/Children/ImportSeedPhrasesFlow/ImportMnemonicsFlowCoordinator.swift b/RadixWallet/Features/ProfileBackupsFeature/RestoreProfileFromBackup/Children/ImportSeedPhrasesFlow/ImportMnemonicsFlowCoordinator.swift index 0b6176179c..db485d19cc 100644 --- a/RadixWallet/Features/ProfileBackupsFeature/RestoreProfileFromBackup/Children/ImportSeedPhrasesFlow/ImportMnemonicsFlowCoordinator.swift +++ b/RadixWallet/Features/ProfileBackupsFeature/RestoreProfileFromBackup/Children/ImportSeedPhrasesFlow/ImportMnemonicsFlowCoordinator.swift @@ -190,7 +190,7 @@ public struct ImportMnemonicsFlowCoordinator: Sendable, FeatureReducer { let treatAsImplicitMain = !toImport.hasAnyBDFSExplicitlyMarkedMain mnemonicsLeftToImport[id: firstBabylonDeviceFactorSource.id]?.isMainBDFS = treatAsImplicitMain } else { - assertionFailure("DISCREPANCY, no babylon device factor source, invalid profile.") + loggerGlobal.notice("no mnemonics to import - probably you uninstalled the app with mnemonics still intact in Keychain") } } diff --git a/RadixWallet/Features/ProfileBackupsFeature/RestoreProfileFromBackup/Children/SelectBackup/SelectBackup+View.swift b/RadixWallet/Features/ProfileBackupsFeature/RestoreProfileFromBackup/Children/SelectBackup/SelectBackup+View.swift index 17f99017ff..93e3ac4efe 100644 --- a/RadixWallet/Features/ProfileBackupsFeature/RestoreProfileFromBackup/Children/SelectBackup/SelectBackup+View.swift +++ b/RadixWallet/Features/ProfileBackupsFeature/RestoreProfileFromBackup/Children/SelectBackup/SelectBackup+View.swift @@ -16,7 +16,7 @@ extension SelectBackup { WithViewStore(store, observe: { $0 }, send: { .view($0) }) { viewStore in coreView(store, with: viewStore) .toolbar { - ToolbarItem(placement: .automatic) { + ToolbarItem(placement: .cancellationAction) { CloseButton { store.send(.view(.closeButtonTapped)) } diff --git a/RadixWallet/Features/SettingsFeature/AccountSecurity/ManualAccountRecoveryScan/ManualAccountRecoveryCoordinator+View.swift b/RadixWallet/Features/SettingsFeature/AccountSecurity/ManualAccountRecoveryScan/ManualAccountRecoveryCoordinator+View.swift index 03b3097883..548f691cec 100644 --- a/RadixWallet/Features/SettingsFeature/AccountSecurity/ManualAccountRecoveryScan/ManualAccountRecoveryCoordinator+View.swift +++ b/RadixWallet/Features/SettingsFeature/AccountSecurity/ManualAccountRecoveryScan/ManualAccountRecoveryCoordinator+View.swift @@ -51,7 +51,7 @@ extension ManualAccountRecoveryCoordinator.View { } .background(.app.white) .toolbar { - ToolbarItem(placement: .automatic) { + ToolbarItem(placement: .cancellationAction) { CloseButton { store.send(.view(.closeButtonTapped)) } diff --git a/RadixWallet/Features/SettingsFeature/ImportFromOlympiaLegacyWallet/Coordinator/ImportOlympiaWalletCoordinator+View.swift b/RadixWallet/Features/SettingsFeature/ImportFromOlympiaLegacyWallet/Coordinator/ImportOlympiaWalletCoordinator+View.swift index 1192e8ce70..1270c7e030 100644 --- a/RadixWallet/Features/SettingsFeature/ImportFromOlympiaLegacyWallet/Coordinator/ImportOlympiaWalletCoordinator+View.swift +++ b/RadixWallet/Features/SettingsFeature/ImportFromOlympiaLegacyWallet/Coordinator/ImportOlympiaWalletCoordinator+View.swift @@ -16,7 +16,7 @@ extension ImportOlympiaWalletCoordinator { let scanQRStore = store.scope(state: \.scanQR, action: { .child(.scanQR($0)) }) ScanMultipleOlympiaQRCodes.View(store: scanQRStore) .toolbar { - ToolbarItem(placement: .primaryAction) { + ToolbarItem(placement: .cancellationAction) { CloseButton { store.send(.view(.closeButtonTapped)) } diff --git a/RadixWallet/Features/TransactionReviewFeature/TransactionReviewDapps/UnknownDappComponents+View.swift b/RadixWallet/Features/TransactionReviewFeature/TransactionReviewDapps/UnknownDappComponents+View.swift index ff09ae8002..19ef593c69 100644 --- a/RadixWallet/Features/TransactionReviewFeature/TransactionReviewDapps/UnknownDappComponents+View.swift +++ b/RadixWallet/Features/TransactionReviewFeature/TransactionReviewDapps/UnknownDappComponents+View.swift @@ -17,7 +17,7 @@ extension UnknownDappComponents { } .navigationBarTitleDisplayMode(.inline) .toolbar { - ToolbarItem(placement: .primaryAction) { + ToolbarItem(placement: .cancellationAction) { CloseButton { store.send(.view(.closeButtonTapped)) } } }