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