From 3ea790eeb34b5963fe4d60d03567bb2c5c48c578 Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Fri, 29 Oct 2021 14:49:54 +0200 Subject: [PATCH] Fixed using TOTP instead of SteamOTP generator when using entry as source for view --- MacPass/MPTOTPSetupViewController.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MacPass/MPTOTPSetupViewController.m b/MacPass/MPTOTPSetupViewController.m index 747fb1ba..fea6a594 100644 --- a/MacPass/MPTOTPSetupViewController.m +++ b/MacPass/MPTOTPSetupViewController.m @@ -216,7 +216,12 @@ typedef NS_ENUM(NSUInteger, MPOTPType) { case MPOTPUpdateSourceEntry: if(self.representedEntry.hasTimeOTP) { - self.generator = [[KPKTimeOTPGenerator alloc] initWithAttributes:self.representedEntry.attributes]; + if(self.representedEntry.hasSteamOTP) { + self.generator = [[KPKSteamOTPGenerator alloc] initWithAttributes:self.representedEntry.attributes]; + } + else { + self.generator = [[KPKTimeOTPGenerator alloc] initWithAttributes:self.representedEntry.attributes]; + } } else { self.generator = [[KPKTimeOTPGenerator alloc] init];