Fix Scala 2.11 complaints

This commit is contained in:
Torkel Rogstad 2019-06-25 10:42:27 +02:00
parent 89e3f7dc38
commit 505d3cbaa1
2 changed files with 26 additions and 17 deletions

View file

@ -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))
}
}

View file

@ -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
}