Skip to content

Commit

Permalink
simplify. add lightness.
Browse files Browse the repository at this point in the history
  • Loading branch information
willyfromtheblock committed Sep 12, 2023
1 parent 515991d commit 66c3210
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/tools/validators.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ bool validateAddress(String address, NetworkParams network) {

/// Returns true if the WIF private key is valid.
bool validateWIFPrivKey(String privKey) {
var valid = true;
try {
WIF.fromString(privKey);
return true;
} catch (e) {
valid = false;
return false;
}
return valid;
}

0 comments on commit 66c3210

Please sign in to comment.