Skip to content

Commit

Permalink
app: Misc refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
patniemeyer committed Dec 6, 2024
1 parent dbe8f3f commit f5661ad
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions gui-orchid/lib/api/orchid_keys.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ class StoredEthereumKey {
}

EthereumKeyPair get() {
if (_keyPair == null) {
_keyPair = Crypto.fromPrivateKey(private);
}
_keyPair ??= Crypto.fromPrivateKey(private);
return _keyPair!; // !
}

Expand Down Expand Up @@ -184,3 +182,12 @@ class TransientEthereumKeyRef extends EthereumKeyRef {
return key;
}
}

// A full key entered by the user that is not intended to be stored persistently.
class TransientEthereumKey extends StoredEthereumKey {
TransientEthereumKey({required super.imported, required super.private});

@override
String get uid => '<no uid>'; // No persistent UID
}

0 comments on commit f5661ad

Please sign in to comment.