mirror of
https://github.com/nostrlabs-io/zap-stream-flutter.git
synced 2025-06-16 11:58:50 +00:00
@ -53,9 +53,11 @@ class LoginAccount {
|
|||||||
if ((json["pubKey"] as String).length != 64) {
|
if ((json["pubKey"] as String).length != 64) {
|
||||||
throw "Invalid pubkey, length != 64";
|
throw "Invalid pubkey, length != 64";
|
||||||
}
|
}
|
||||||
if (json.containsKey("privateKey") &&
|
if (json.containsKey("privateKey")) {
|
||||||
(json["privateKey"] as String).length != 64) {
|
final privKey = json["privateKey"] as String?;
|
||||||
throw "Invalid privateKey, length != 64";
|
if (privKey != null && privKey.length != 64) {
|
||||||
|
throw "Invalid privateKey, length != 64";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return LoginAccount._(
|
return LoginAccount._(
|
||||||
type: AccountType.values.firstWhere(
|
type: AccountType.values.firstWhere(
|
||||||
|
Reference in New Issue
Block a user