From 76f8162a1c68ce24bcd266d6c1497954303d6964 Mon Sep 17 00:00:00 2001 From: Romantsov Date: Wed, 24 Feb 2016 13:00:34 +0200 Subject: [PATCH] Bip39TrezorTest fix. --- .../test/java/com/bitsofproof/supernode/api/BIP39Test.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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))); } }