From 2fd7e8e7e417212c7b6555a463f25004650d3a01 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Wed, 6 Oct 2021 08:22:30 +0200 Subject: [PATCH] add mnemonic seed type exception --- .../drongo/wallet/MnemonicException.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/com/sparrowwallet/drongo/wallet/MnemonicException.java b/src/main/java/com/sparrowwallet/drongo/wallet/MnemonicException.java index 02a1cb6..6155acf 100644 --- a/src/main/java/com/sparrowwallet/drongo/wallet/MnemonicException.java +++ b/src/main/java/com/sparrowwallet/drongo/wallet/MnemonicException.java @@ -39,4 +39,16 @@ public class MnemonicException extends Exception { this.badWord = badWord; } } + + /** + * Thrown when the mnemonic is valid, but for for the expected standard + */ + public static class MnemonicTypeException extends MnemonicException { + public final DeterministicSeed.Type invalidType; + + public MnemonicTypeException(DeterministicSeed.Type invalidType) { + super(); + this.invalidType = invalidType; + } + } }