diff --git a/wallet-test/src/test/scala/org/bitcoins/wallet/TrezorAddressTest.scala b/wallet-test/src/test/scala/org/bitcoins/wallet/TrezorAddressTest.scala index bc5f6c5dc3..78fab9e678 100644 --- a/wallet-test/src/test/scala/org/bitcoins/wallet/TrezorAddressTest.scala +++ b/wallet-test/src/test/scala/org/bitcoins/wallet/TrezorAddressTest.scala @@ -43,22 +43,29 @@ import scala.concurrent.ExecutionContext class TrezorAddressTest extends BitcoinSWalletTest with EmptyFixture { val mnemonic = MnemonicCode.fromWords( - Vector("stage", - "boring", - "net", - "gather", - "radar", - "radio", - "arrest", - "eye", - "ask", - "risk", - "girl", - "country")) + Vector( + "stage", + "boring", + "net", + "gather", + "radar", + "radio", + "arrest", + "eye", + "ask", + "risk", + "girl", + "country" + ) + ) lazy val json: JsValue = { + val stream = { + val classLoader = getClass().getClassLoader() + classLoader.getResourceAsStream("trezor-addresses.json") + } val rawText = Source - .fromResource("trezor-addresses.json") + .fromInputStream(stream) .getLines .drop(1) // first line is a comment .mkString @@ -279,7 +286,7 @@ class TrezorAddressTest extends BitcoinSWalletTest with EmptyFixture { nestedAssertions.flatten } - assert(assertions.forall(_.isInstanceOf[succeed.type])) + assert(assertions.forall(_.isCompleted)) } } diff --git a/wallet-test/src/test/scala/org/bitcoins/wallet/util/GetAddresses.scala b/wallet-test/src/test/scala/org/bitcoins/wallet/util/GetAddresses.scala index 9fc543a23f..c947bb7ca3 100644 --- a/wallet-test/src/test/scala/org/bitcoins/wallet/util/GetAddresses.scala +++ b/wallet-test/src/test/scala/org/bitcoins/wallet/util/GetAddresses.scala @@ -37,7 +37,7 @@ object GetAddresses extends App { val accountPath = BIP32Path( BIP32Node(constant.constant, hardened = true), BIP32Node(coin.toInt, hardened = true), - BIP32Node(accountIndex, hardened = true), + BIP32Node(accountIndex, hardened = true) ) val pathType = @@ -83,7 +83,8 @@ object GetAddresses extends App { "chain" -> chainType.toString, "addressIndex" -> addressIndex, "address" -> address - )) + ) + ) json } @@ -94,7 +95,8 @@ object GetAddresses extends App { "account" -> accountIndex, "xpub" -> xpub, "addresses" -> addresses - )) + ) + ) json }