diff --git a/src/AliasVault.Client/Main/Components/TotpCodes/TotpViewer.razor b/src/AliasVault.Client/Main/Components/TotpCodes/TotpViewer.razor index 21dc62fac..eff7fd6dc 100644 --- a/src/AliasVault.Client/Main/Components/TotpCodes/TotpViewer.razor +++ b/src/AliasVault.Client/Main/Components/TotpCodes/TotpViewer.razor @@ -106,6 +106,17 @@ return step - (int)(unixTimestamp % step); } + /// + /// Gets the remaining percentage for the TOTP code. + /// + /// The remaining percentage. + private static int GetRemainingPercentage() + { + var remaining = GetRemainingSeconds(); + // Invert the percentage so it counts down instead of up + return (int)(((30.0 - remaining) / 30.0) * 100); + } + /// /// Refreshes the TOTP codes by generating new codes based on the secret keys. /// @@ -141,17 +152,6 @@ return newCode; } - /// - /// Gets the remaining percentage for the TOTP code. - /// - /// The remaining percentage. - private int GetRemainingPercentage() - { - var remaining = GetRemainingSeconds(); - // Invert the percentage so it counts down instead of up - return (int)(((30.0 - remaining) / 30.0) * 100); - } - /// /// Copies the TOTP code to the clipboard. ///