diff --git a/api/src/test/java/com/bitsofproof/supernode/api/BIP39Test.java b/api/src/test/java/com/bitsofproof/supernode/api/BIP39Test.java index 2c5b255a..0ada8e43 100644 --- a/api/src/test/java/com/bitsofproof/supernode/api/BIP39Test.java +++ b/api/src/test/java/com/bitsofproof/supernode/api/BIP39Test.java @@ -64,11 +64,11 @@ public void bip39TrezorTest () throws IOException, JSONException, ValidationExce { JSONObject testData = readObject (TESTS); JSONArray english = testData.getJSONArray ("english"); - for ( int i = 0; i < testData.length (); ++i ) + for ( int i = 0; i < english.length (); ++i ) { JSONArray test = english.getJSONArray (i); - String m = BIP39.getMnemonic (ByteUtils.fromHex (test.getString (i))); - assertTrue (m.equals (test.getString (i + 1))); + String m = BIP39.getMnemonic(ByteUtils.fromHex(test.getString(0))); + assertTrue (m.equals (test.getString (1))); } }