Add test to ensure we error on scan account id when trying to recover an account

This commit is contained in:
bemusementpark 2024-07-10 23:48:05 +09:30
parent 71f04678cf
commit 4a2f6e7b4e

View File

@ -96,6 +96,14 @@ class MnemonicCodecTest {
assertEquals("0f2ccde528622876b8f16e14db97dafc", result)
}
@Test
fun `decodeMnemonicOrHexAsByteArray with account id throws`() {
assertThrows(InvalidWord::class.java) {
codec.decodeMnemonicOrHexAsByteArray("0582e1421da6f584a4795d30b654b4f25fed860afdf081075cb26a2b997e492f14").let(Hex::toStringCondensed)
}
}
@Test
fun `decodeMnemonicOrHexAsByteArray with bad hex`() {
// throws InvalidWord as 0f2ccde528622876b8f16e14db97dafcg is not a valid word on the english wordlist.