Merge pull request #48 from ente-io/fix_incorrect_scanning

This commit is contained in:
Vishnu Mohandas 2023-02-05 01:03:11 +05:30 committed by GitHub
commit 2435c9ddef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -115,7 +115,12 @@ class Code {
}
static Type _getType(Uri uri) {
return uri.host == "totp" ? Type.totp : Type.hotp;
if (uri.host == "totp") {
return Type.totp;
} else if (uri.host == "hotp") {
return Type.hotp;
}
throw UnsupportedError("Unsupported format with host ${uri.host}");
}
@override