From 62f56977f9682af6f290c847da5f2c11357a5be4 Mon Sep 17 00:00:00 2001 From: dankito Date: Sun, 26 Jul 2020 16:32:22 +0200 Subject: [PATCH] Fixed filtering chipTAN USB as this TAN procedure is not supported on iOS --- ui/BankingiOSApp/BankingiOSApp/ui/views/AccountsTab.swift | 1 + ui/BankingiOSApp/BankingiOSApp/ui/views/EnterTanDialog.swift | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/AccountsTab.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/AccountsTab.swift index 9eea552c..c8d880ef 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/AccountsTab.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/AccountsTab.swift @@ -24,6 +24,7 @@ struct AccountsTab: View { NavigationLink(destination: AddAccountDialog()) { Text("Add account") } + .padding() Spacer() } diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/EnterTanDialog.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/EnterTanDialog.swift index 11235ba7..4f004dbc 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/EnterTanDialog.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/EnterTanDialog.swift @@ -37,7 +37,8 @@ struct EnterTanDialog: View { self.tanChallenge = state.tanChallenge self.customer = state.customer - self.customersTanProcdures = customer.supportedTanProcedures + self.customersTanProcedures = customer.supportedTanProcedures.filter( {$0.type != .chiptanusb } ) // USB tan generators are not supported on iOS + _selectedTanProcedureIndex = State(initialValue: customer.supportedTanProcedures.firstIndex(of: tanChallenge.tanProcedure) ?? 0) self.customersTanMedia = customer.tanMediaSorted