From 81c64d54edc2641e515272d57b68b7fb98455089 Mon Sep 17 00:00:00 2001 From: matiasbzurovski <164921079+matiasbzurovski@users.noreply.github.com> Date: Thu, 4 Jul 2024 17:22:18 +0200 Subject: [PATCH] [ABW-3479] Link Connector updates (#1198) --- RadixWallet.xcodeproj/project.pbxproj | 16 +- .../ChooseReceivingAccount+Reducer.swift | 2 +- .../Coordinator/NewConnection+Reducer.swift | 6 +- .../Children/ScanQR/DoScanQR+View.swift | 152 ---------------- ...nQR+Reducer.swift => ScanQR+Reducer.swift} | 30 ++-- .../ScanQR/Children/ScanQR/ScanQR+View.swift | 162 ++++++++++++++++++ .../ScanQRCoordinator+Reducer.swift | 8 +- .../Coordinator/ScanQRCoordinator+View.swift | 2 +- .../ScanMultipleOlympiaQRCodes.swift | 2 +- .../NewConnectionFeatureTests.swift | 2 +- 10 files changed, 198 insertions(+), 184 deletions(-) delete mode 100644 RadixWallet/Features/ScanQR/Children/ScanQR/DoScanQR+View.swift rename RadixWallet/Features/ScanQR/Children/ScanQR/{DoScanQR+Reducer.swift => ScanQR+Reducer.swift} (72%) create mode 100644 RadixWallet/Features/ScanQR/Children/ScanQR/ScanQR+View.swift diff --git a/RadixWallet.xcodeproj/project.pbxproj b/RadixWallet.xcodeproj/project.pbxproj index 655ae4a6b4..a8c6e51be4 100644 --- a/RadixWallet.xcodeproj/project.pbxproj +++ b/RadixWallet.xcodeproj/project.pbxproj @@ -249,8 +249,8 @@ 48CFC3282ADC10D900E77A5C /* ScanQRCoordinator+View.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFBDD92ADC10D800E77A5C /* ScanQRCoordinator+View.swift */; }; 48CFC3292ADC10D900E77A5C /* CameraPermission+Reducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFBDDC2ADC10D800E77A5C /* CameraPermission+Reducer.swift */; }; 48CFC32A2ADC10D900E77A5C /* CameraPermission+View.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFBDDD2ADC10D800E77A5C /* CameraPermission+View.swift */; }; - 48CFC32B2ADC10D900E77A5C /* DoScanQR+View.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFBDDF2ADC10D800E77A5C /* DoScanQR+View.swift */; }; - 48CFC32C2ADC10D900E77A5C /* DoScanQR+Reducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFBDE02ADC10D800E77A5C /* DoScanQR+Reducer.swift */; }; + 48CFC32B2ADC10D900E77A5C /* ScanQR+View.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFBDDF2ADC10D800E77A5C /* ScanQR+View.swift */; }; + 48CFC32C2ADC10D900E77A5C /* ScanQR+Reducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFBDE02ADC10D800E77A5C /* ScanQR+Reducer.swift */; }; 48CFC3302ADC10D900E77A5C /* ImportMnemonicWord.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFBDE72ADC10D800E77A5C /* ImportMnemonicWord.swift */; }; 48CFC3312ADC10D900E77A5C /* ImportMnemonicWord+View.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFBDE82ADC10D800E77A5C /* ImportMnemonicWord+View.swift */; }; 48CFC3322ADC10D900E77A5C /* ImportMnemonic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFBDE92ADC10D800E77A5C /* ImportMnemonic.swift */; }; @@ -1415,8 +1415,8 @@ 48CFBDD92ADC10D800E77A5C /* ScanQRCoordinator+View.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ScanQRCoordinator+View.swift"; sourceTree = ""; }; 48CFBDDC2ADC10D800E77A5C /* CameraPermission+Reducer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CameraPermission+Reducer.swift"; sourceTree = ""; }; 48CFBDDD2ADC10D800E77A5C /* CameraPermission+View.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CameraPermission+View.swift"; sourceTree = ""; }; - 48CFBDDF2ADC10D800E77A5C /* DoScanQR+View.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DoScanQR+View.swift"; sourceTree = ""; }; - 48CFBDE02ADC10D800E77A5C /* DoScanQR+Reducer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DoScanQR+Reducer.swift"; sourceTree = ""; }; + 48CFBDDF2ADC10D800E77A5C /* ScanQR+View.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ScanQR+View.swift"; sourceTree = ""; }; + 48CFBDE02ADC10D800E77A5C /* ScanQR+Reducer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ScanQR+Reducer.swift"; sourceTree = ""; }; 48CFBDE72ADC10D800E77A5C /* ImportMnemonicWord.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImportMnemonicWord.swift; sourceTree = ""; }; 48CFBDE82ADC10D800E77A5C /* ImportMnemonicWord+View.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ImportMnemonicWord+View.swift"; sourceTree = ""; }; 48CFBDE92ADC10D800E77A5C /* ImportMnemonic.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImportMnemonic.swift; sourceTree = ""; }; @@ -3599,8 +3599,8 @@ 48CFBDDE2ADC10D800E77A5C /* ScanQR */ = { isa = PBXGroup; children = ( - 48CFBDDF2ADC10D800E77A5C /* DoScanQR+View.swift */, - 48CFBDE02ADC10D800E77A5C /* DoScanQR+Reducer.swift */, + 48CFBDDF2ADC10D800E77A5C /* ScanQR+View.swift */, + 48CFBDE02ADC10D800E77A5C /* ScanQR+Reducer.swift */, ); path = ScanQR; sourceTree = ""; @@ -7479,7 +7479,7 @@ 831F0CF42C294BAA00D6F5BF /* DeepLinkHandlerClient+Live.swift in Sources */, 48CFC5602ADC10DA00E77A5C /* ValidationErrorsAtPath.swift in Sources */, 48CFC4452ADC10DA00E77A5C /* OnboardingClient+Test.swift in Sources */, - 48CFC32C2ADC10D900E77A5C /* DoScanQR+Reducer.swift in Sources */, + 48CFC32C2ADC10D900E77A5C /* ScanQR+Reducer.swift in Sources */, 48CFC37A2ADC10D900E77A5C /* PoolUnitDetails.swift in Sources */, 83EE47A02AF0EECD00155F03 /* TransactionNonFungibleBalanceChanges.swift in Sources */, 48CFC28E2ADC10D900E77A5C /* TransactionReviewRawTransaction.swift in Sources */, @@ -7733,7 +7733,7 @@ 48CFC4982ADC10DA00E77A5C /* MetadataUrlValue.swift in Sources */, 83EE48DE2B8F4081006CE672 /* AccountPortfoliosClient+State.swift in Sources */, 48CFC41E2ADC10DA00E77A5C /* NonEmpty+Extra.swift in Sources */, - 48CFC32B2ADC10D900E77A5C /* DoScanQR+View.swift in Sources */, + 48CFC32B2ADC10D900E77A5C /* ScanQR+View.swift in Sources */, 48CFC42B2ADC10DA00E77A5C /* Identifiable+RawRepresentable.swift in Sources */, 48D5F3902BD8DDB9000DE964 /* DebugUserDefaultsContents.swift in Sources */, 83EE47852AF0EE3C00155F03 /* ProgrammaticScryptoSborValueString.swift in Sources */, diff --git a/RadixWallet/Features/AssetTransferFeature/Components/ChooseAccount/ChooseReceivingAccount+Reducer.swift b/RadixWallet/Features/AssetTransferFeature/Components/ChooseAccount/ChooseReceivingAccount+Reducer.swift index 417d435888..afe3601dfd 100644 --- a/RadixWallet/Features/AssetTransferFeature/Components/ChooseAccount/ChooseReceivingAccount+Reducer.swift +++ b/RadixWallet/Features/AssetTransferFeature/Components/ChooseAccount/ChooseReceivingAccount+Reducer.swift @@ -110,7 +110,7 @@ public struct ChooseReceivingAccount: Sendable, FeatureReducer { public func reduce(into state: inout State, viewAction: ViewAction) -> Effect { switch viewAction { case .scanQRCode: - state.destination = .scanAccountAddress(.init(scanInstructions: L10n.AssetTransfer.qrScanInstructions)) + state.destination = .scanAccountAddress(.init(kind: .account)) return .none case .closeButtonTapped: diff --git a/RadixWallet/Features/NewConnectionFeature/Coordinator/NewConnection+Reducer.swift b/RadixWallet/Features/NewConnectionFeature/Coordinator/NewConnection+Reducer.swift index 2b7039749a..93a5d0c89a 100644 --- a/RadixWallet/Features/NewConnectionFeature/Coordinator/NewConnection+Reducer.swift +++ b/RadixWallet/Features/NewConnectionFeature/Coordinator/NewConnection+Reducer.swift @@ -204,8 +204,7 @@ public struct NewConnection: Sendable, FeatureReducer { switch childAction { case let .root(.localNetworkPermission(.delegate(.permissionResponse(allowed)))): if allowed { - let string = L10n.LinkedConnectors.NewConnection.subtitle - state.root = .scanQR(.init(scanInstructions: string)) + state.root = .scanQR(.init(kind: .connectorExtension)) return .none } else { return .run { _ in @@ -235,8 +234,7 @@ public struct NewConnection: Sendable, FeatureReducer { case let .approveExisitingConnection(connectionName): return .send(.internal(.establishConnection(connectionName))) case .approveRelinkAfterProfileRestore, .approveRelinkAfterUpdate: - let string = L10n.LinkedConnectors.NewConnection.subtitle - state.root = .scanQR(.init(scanInstructions: string)) + state.root = .scanQR(.init(kind: .connectorExtension)) return .none } diff --git a/RadixWallet/Features/ScanQR/Children/ScanQR/DoScanQR+View.swift b/RadixWallet/Features/ScanQR/Children/ScanQR/DoScanQR+View.swift deleted file mode 100644 index 663c92db7d..0000000000 --- a/RadixWallet/Features/ScanQR/Children/ScanQR/DoScanQR+View.swift +++ /dev/null @@ -1,152 +0,0 @@ -import CodeScanner -import ComposableArchitecture -import SwiftUI - -extension ScanQR.State { - var viewState: ScanQR.ViewState { - .init(state: self) - } -} - -// MARK: - ScanQR.View -extension ScanQR { - public struct ViewState: Equatable { - public let scanMode: QRScanMode - #if targetEnvironment(simulator) - public var manualQRContent: String - #endif // sim - public let instructions: String - init(state: ScanQR.State) { - self.scanMode = state.scanMode - self.instructions = state.scanInstructions - #if targetEnvironment(simulator) - self.manualQRContent = state.manualQRContent - #endif // sim - } - } - - @MainActor - public struct View: SwiftUI.View { - private let store: StoreOf - - public init(store: StoreOf) { - self.store = store - } - - public var body: some SwiftUI.View { - WithViewStore(store, observe: \.viewState, send: { .view($0) }) { viewStore in - VStack(spacing: .medium1) { - #if !targetEnvironment(simulator) - scanQRCode(viewStore: viewStore) - #else - simulatorInputView(viewStore: viewStore) - #endif - Spacer() - } - .padding(.all, .large3) - } - } - } -} - -// MARK: - QRScanMode -public enum QRScanMode: Sendable, Hashable { - /// Scan exactly one code, then stop. - case once - - /// Scan each code no more than once. - case oncePerCode - - /// Keep scanning all codes until dismissed. - case continuous - - /// Scan only when capture button is tapped. - case manual - - public static let `default`: Self = .oncePerCode - - func forCodeScannerView() -> ScanMode { - switch self { - case .continuous: .continuous - case .manual: .manual - case .oncePerCode: .oncePerCode - case .once: .once - } - } -} - -extension ScanQR.View { - @ViewBuilder - private func scanQRCode( - viewStore: ViewStoreOf - ) -> some View { - #if !targetEnvironment(simulator) - - Text(viewStore.instructions) - .foregroundColor(.app.gray1) - .textStyle(.body1Regular) - .multilineTextAlignment(.center) - - CodeScannerView( - codeTypes: [.qr], - scanMode: viewStore.scanMode.forCodeScannerView() - ) { response in - switch response { - case let .failure(error): - viewStore.send(.scanned(.failure(error))) - case let .success(result): - viewStore.send(.scanned(.success(result.string))) - } - } - .aspectRatio(1, contentMode: .fit) - .cornerRadius(.small2) - - #else - EmptyView() - #endif // !TARGET_OS_SIMULATOR - } - - @ViewBuilder - private func simulatorInputView( - viewStore: ViewStoreOf - ) -> some View { - #if targetEnvironment(simulator) - VStack(alignment: .center) { - Text("Manually input QR string content") - TextField( - "QR String content", - text: viewStore.binding( - get: \.manualQRContent, - send: { .macInputQRContentChanged($0) } - ) - ) - .textFieldStyle(.roundedBorder) - Button("Emulate QR scan") { - viewStore.send(.macConnectButtonTapped) - }.buttonStyle(.primaryRectangular) - } - #else - EmptyView() - #endif // sim - } -} - -#if DEBUG -import ComposableArchitecture -import SwiftUI - -struct ScanQR_Preview: PreviewProvider { - static var previews: some View { - ScanQR.View( - store: .init( - initialState: .previewValue, - reducer: ScanQR.init - ) - ) - } -} - -extension ScanQR.State { - public static let previewValue: Self = .init(scanInstructions: "Preview") -} -#endif diff --git a/RadixWallet/Features/ScanQR/Children/ScanQR/DoScanQR+Reducer.swift b/RadixWallet/Features/ScanQR/Children/ScanQR/ScanQR+Reducer.swift similarity index 72% rename from RadixWallet/Features/ScanQR/Children/ScanQR/DoScanQR+Reducer.swift rename to RadixWallet/Features/ScanQR/Children/ScanQR/ScanQR+Reducer.swift index 39099a81ae..bdfadbcfe9 100644 --- a/RadixWallet/Features/ScanQR/Children/ScanQR/DoScanQR+Reducer.swift +++ b/RadixWallet/Features/ScanQR/Children/ScanQR/ScanQR+Reducer.swift @@ -3,36 +3,33 @@ import SwiftUI // MARK: - ScanQR public struct ScanQR: Sendable, FeatureReducer { + @ObservableState public struct State: Sendable, Hashable { - public let scanInstructions: String - public let scanMode: QRScanMode + public let kind: Kind #if targetEnvironment(simulator) public var manualQRContent: String public init( - scanInstructions: String, - scanMode: QRScanMode = .default, + kind: Kind, manualQRContent: String = "" ) { - self.scanInstructions = scanInstructions - self.scanMode = scanMode + self.kind = kind self.manualQRContent = manualQRContent } #else public init( - scanInstructions: String, - scanMode: QRScanMode = .default + kind: Kind ) { - self.scanInstructions = scanInstructions - self.scanMode = scanMode + self.kind = kind } #endif // sim } + @CasePathable public enum ViewAction: Sendable, Equatable { case scanned(TaskResult) #if targetEnvironment(simulator) - case macInputQRContentChanged(String) + case manualQRContentChanged(String) case macConnectButtonTapped #endif // sim } @@ -48,7 +45,7 @@ public struct ScanQR: Sendable, FeatureReducer { public func reduce(into state: inout State, viewAction: ViewAction) -> Effect { switch viewAction { #if targetEnvironment(simulator) - case let .macInputQRContentChanged(manualQRContent): + case let .manualQRContentChanged(manualQRContent): state.manualQRContent = manualQRContent return .none @@ -65,3 +62,12 @@ public struct ScanQR: Sendable, FeatureReducer { } } } + +// MARK: ScanQR.Kind +extension ScanQR { + public enum Kind: Sendable, Hashable { + case connectorExtension + case account + case importOlympia + } +} diff --git a/RadixWallet/Features/ScanQR/Children/ScanQR/ScanQR+View.swift b/RadixWallet/Features/ScanQR/Children/ScanQR/ScanQR+View.swift new file mode 100644 index 0000000000..433e084db5 --- /dev/null +++ b/RadixWallet/Features/ScanQR/Children/ScanQR/ScanQR+View.swift @@ -0,0 +1,162 @@ +import CodeScanner +import ComposableArchitecture +import SwiftUI + +// MARK: - ScanQR.View +extension ScanQR { + @MainActor + public struct View: SwiftUI.View { + @Perception.Bindable var store: StoreOf + + public init(store: StoreOf) { + self.store = store + } + + public var body: some SwiftUI.View { + WithPerceptionTracking { + VStack(spacing: .medium1) { + #if !targetEnvironment(simulator) + scanQRCode + #else + simulatorInputView + Spacer() + #endif + } + .padding(.horizontal, .large3) + .padding(.top, .small2) + .padding(.bottom, .medium3) + } + } + } +} + +extension ScanQR.View { + @ViewBuilder + private var scanQRCode: some View { + #if !targetEnvironment(simulator) + + Text(store.kind.instructions) + .foregroundColor(.app.gray1) + .textStyle(.body1Regular) + .multilineTextAlignment(.center) + + CodeScannerView( + codeTypes: [.qr], + scanMode: store.kind.scanMode + ) { response in + switch response { + case let .failure(error): + store.send(.view(.scanned(.failure(error)))) + case let .success(result): + store.send(.view(.scanned(.success(result.string)))) + } + } + .aspectRatio(1, contentMode: .fit) + .cornerRadius(.small2) + + if let disclosure = store.kind.disclosure { + bottomView(disclosure) + } else { + Spacer() + } + + #else + EmptyView() + #endif // !TARGET_OS_SIMULATOR + } + + private func bottomView(_ disclosure: ScanQR.Kind.Disclosure) -> some View { + VStack(alignment: .leading, spacing: .small1) { + Text(disclosure.title) + .font(.app.body2Header) + .foregroundColor(.app.gray1) + VStack(alignment: .leading, spacing: .small3) { + ForEach(Array(disclosure.items.enumerated()), id: \.0) { index, message in + HStack(alignment: .top, spacing: .small3) { + Text("\(index + 1).") + Text(markdown: message, emphasizedColor: .app.gray1) + } + .multilineTextAlignment(.leading) + .font(.app.body2Regular) + .foregroundColor(.app.gray1) + } + } + } + } + + @ViewBuilder + private var simulatorInputView: some View { + #if targetEnvironment(simulator) + VStack(alignment: .center) { + Text("Manually input QR string content") + TextField( + "QR String content", + text: $store.manualQRContent.sending(\.view.manualQRContentChanged) + ) + .textFieldStyle(.roundedBorder) + Button("Emulate QR scan") { + store.send(.view(.macConnectButtonTapped)) + }.buttonStyle(.primaryRectangular) + } + #else + EmptyView() + #endif // sim + } +} + +private extension ScanQR.Kind { + var instructions: String { + switch self { + case .connectorExtension: L10n.ScanQR.ConnectorExtension.instructions + case .account: L10n.ScanQR.Account.instructions + case .importOlympia: L10n.ScanQR.ImportOlympia.instructions + } + } + + var scanMode: ScanMode { + switch self { + case .connectorExtension, .account, .importOlympia: + .oncePerCode + } + } + + var disclosure: Disclosure? { + switch self { + case .account, .importOlympia: + nil + case .connectorExtension: + .init( + title: L10n.ScanQR.ConnectorExtension.disclosureTitle, + items: [ + L10n.ScanQR.ConnectorExtension.disclosureItem1, + L10n.ScanQR.ConnectorExtension.disclosureItem2, + ] + ) + } + } + + struct Disclosure { + let title: String + let items: [String] + } +} + +#if DEBUG +import ComposableArchitecture +import SwiftUI + +struct ScanQR_Preview: PreviewProvider { + static var previews: some View { + ScanQR.View( + store: .init( + initialState: .previewValue, + reducer: ScanQR.init + ) + ) + } +} + +extension ScanQR.State { + public static let previewValue: Self = .init(kind: .account) +} +#endif diff --git a/RadixWallet/Features/ScanQR/Coordinator/ScanQRCoordinator+Reducer.swift b/RadixWallet/Features/ScanQR/Coordinator/ScanQRCoordinator+Reducer.swift index a9dddbd151..163eaf54a9 100644 --- a/RadixWallet/Features/ScanQR/Coordinator/ScanQRCoordinator+Reducer.swift +++ b/RadixWallet/Features/ScanQR/Coordinator/ScanQRCoordinator+Reducer.swift @@ -14,12 +14,12 @@ public struct ScanQRCoordinator: Sendable, FeatureReducer { } public var step: Step - public let scanInstructions: String + public let kind: ScanQR.Kind public init( - scanInstructions: String, + kind: ScanQR.Kind, step: Step = .init() ) { - self.scanInstructions = scanInstructions + self.kind = kind self.step = step } } @@ -57,7 +57,7 @@ public struct ScanQRCoordinator: Sendable, FeatureReducer { public func reduce(into state: inout State, internalAction: InternalAction) -> Effect { switch internalAction { case .proceedWithScan: - state.step = .scanQR(.init(scanInstructions: state.scanInstructions)) + state.step = .scanQR(.init(kind: state.kind)) return .none } } diff --git a/RadixWallet/Features/ScanQR/Coordinator/ScanQRCoordinator+View.swift b/RadixWallet/Features/ScanQR/Coordinator/ScanQRCoordinator+View.swift index efe255b42c..7a90ce8669 100644 --- a/RadixWallet/Features/ScanQR/Coordinator/ScanQRCoordinator+View.swift +++ b/RadixWallet/Features/ScanQR/Coordinator/ScanQRCoordinator+View.swift @@ -48,6 +48,6 @@ struct ScannQR_Preview: PreviewProvider { } extension ScanQRCoordinator.State { - public static let previewValue: Self = .init(scanInstructions: "Preview") + public static let previewValue: Self = .init(kind: .account) } #endif diff --git a/RadixWallet/Features/SettingsFeature/Troubleshooting/ImportFromOlympiaLegacyWallet/Children/ScanMultipleQRCodes/ScanMultipleOlympiaQRCodes.swift b/RadixWallet/Features/SettingsFeature/Troubleshooting/ImportFromOlympiaLegacyWallet/Children/ScanMultipleQRCodes/ScanMultipleOlympiaQRCodes.swift index f410fabe34..a43c3d4709 100644 --- a/RadixWallet/Features/SettingsFeature/Troubleshooting/ImportFromOlympiaLegacyWallet/Children/ScanMultipleQRCodes/ScanMultipleOlympiaQRCodes.swift +++ b/RadixWallet/Features/SettingsFeature/Troubleshooting/ImportFromOlympiaLegacyWallet/Children/ScanMultipleQRCodes/ScanMultipleOlympiaQRCodes.swift @@ -18,7 +18,7 @@ public struct ScanMultipleOlympiaQRCodes: Sendable, FeatureReducer { public init( scannedPayloads: IdentifiedArrayOf = [] ) { - self.scanQR = .init(scanInstructions: L10n.ImportOlympiaAccounts.ScanQR.instructions) + self.scanQR = .init(kind: .importOlympia) self.scannedPayloads = scannedPayloads } diff --git a/RadixWalletTests/Features/NewConnectionFeatureTests/NewConnectionFeatureTests.swift b/RadixWalletTests/Features/NewConnectionFeatureTests/NewConnectionFeatureTests.swift index dc372f9cdc..f35cf72979 100644 --- a/RadixWalletTests/Features/NewConnectionFeatureTests/NewConnectionFeatureTests.swift +++ b/RadixWalletTests/Features/NewConnectionFeatureTests/NewConnectionFeatureTests.swift @@ -11,7 +11,7 @@ final class NewConnectionTests: TestCase { // GIVEN // initial state initialState: NewConnection.State( - root: .scanQR(.init(scanInstructions: scanInstruction, step: .scanQR(.init(scanInstructions: scanInstruction)))) + root: .scanQR(.init(kind: .account, step: .scanQR(.init(kind: .account)))) ), reducer: NewConnection.init )